The WinReducer Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The WinReducer ForumLog in

FORUM

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? Empty[ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
Hi,

I'm trying to copy a directory with files with the WinReducerPI.cmd
This did not work, because of not enough rights.

First I simply try this,

Code:

call xcopy "%CDROM%\WinReducerPI\autoruns\*" "c:\Program Files\AutoRuns" /s /e /c /y /q > NUL

but I get the message, that the directory is not there.

So I thought I had to create them first,

Code:

md "c:\Program Files\AutoRuns"
call xcopy "%CDROM%\WinReducerPI\autoruns\*" "c:\Program Files\AutoRuns" /s /e /c /y /q > NUL

but now I get the error, that I do not have the rights to do that.

What can I do ?

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
1.  Do you run this .cmd file as an Administrator (Elevated Prompt) ??

2.  Do you need to use 'call' before xcopy.  Doesn't it work without call ?

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
to 1)
I don't know, how the .cmd is started. Its done automatically when winreducer windows is installed

to 2)
No. I don't need the call command, but it makes all clearly arranged, because I will copy many portable programs to the installation and the call command waits till one xcopy is done before another xcopy starts.
Without it, the installations are shown as finished, but there are still files copied in background.
So thats no good time to make a reboot Smile

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
OK, try this...

Code:

md "c:\Program Files\AutoRuns"

takeown /F "c:\Program Files\AutoRuns" /A /D Y
icacls "c:\Program Files\AutoRuns" /grant Administrators:F /T /C /Q

call xcopy "%CDROM%\WinReducerPI\autoruns\*" "c:\Program Files\AutoRuns" /s /e /c /y /q > NUL

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
I tried it, but I get the following result...

Access is Denied
Error: the file or directory was not found

So it fails already when trying to make the directory.
Perhaps my way to copy files into the installation is to complicated.

Is there another way, to simply add a directory and files into "c:\Program Files\" into the installation ?

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
What I really don't undersand is ...

In the same WinReducerPI.cmd I can install programs with setup.exe like the Intel Chipset Drivers ( call  "%CDROM%\WinReducerPI\Intel_CHIPSET\infinst_autol.exe" -S -L 0407 ) which works fine, but I am not able to create a directory, because I have not enough rights to do this ???

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
Hello,

Maybe you could try to use this technique which seems to work for JamieTheWolf :
https://forum.winreducer.net/t900-elevate-command-prompt

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
No, it did not work for me.
A cmd box is opened and closed , and nothing happend.

P.S.: UAC is disabled in my winreducer iso

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
Because I can not find a easy solution with WinReducerPI.cmd for copying files and folders, I only use it to install a couple of programs with silent switches. The simple copy job - I do it this way...

I made a command file, which:

- extracts the original ms iso file
- mount the install.wim
- integrates all updates
- integrates my drivers
- copies all portable programs to the mounted location
- commits the changes and unmount the install.wim

This install.wim within its original structure is my basis for WinReducer.
This works very good for me.

If someone knows a simple way using the WinReducerPI.cmd, please post it here.


Thank you

description[ANSWERED]How to copy complete directory with WinReducerPI.cmd ? EmptyRe: [ANSWERED]How to copy complete directory with WinReducerPI.cmd ?

more_horiz
It sounds like the WinReducerPI.cmd is not run as a true Administrator - You don't have rights to the "Program Files" folder at that point.  Try copying them to the user's %TEMP% folder.
You may need to add a few extra lines to work out where exactly that is going  Wink

Or, you could try the C:\Users\Public folder
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum