Jump to content

Hide cmd window for Xcopy from runonceex?


Recommended Posts

I have runonceex launching xcopy with this command:

HKLM,"%RunOnceEx%\BBinstall",1,,"%11%\xcopy.exe %01%\install %24%\install\ /S /C /Q /H /Y"

But this causes a large, blank, cmd window to pop up. How can I do this without the cmd window taking up the screen?

I thought of calling xcopy.cmd with

cmdow at the beginning to hid the window, but the problem with that is then I don't know how to label the source drive... I need a variable which points to the cd drive windows was installed from.

Any suggestions?

Link to comment
Share on other sites


Hmm... seems to work, though the runonce window skips past the 'copying files' step very quickly... it's getting done, but I'm afraid the file copy is running in the background while programs are installing.

While it doesn't seem to be a problem right now, it could be, if by some chance the programs being installed hadn't been copied over yet...

is there a way to add a wait command with the xcopy, so that it won't continue processing runonceex until that step is over?

Link to comment
Share on other sites

it you went with your original idea of having a seperate CMD file....you could do it like so....

HKLM,"%RunOnceEx%\BBinstall",1,,"%11%\xcopy.cmd %01%"

then in xcopy.cmd

xcopy.exe %1\install %SYSTEMROOT%\install\ /S /C /Q /H /Y

(I took a guess at %24%, I forgot all the DIRIDs at the moment.)

but basically I passed %01% to the xcopy.cmd, and %1 in the CMD file is the first argument, where %2 would be the second, if there is one. Each argument is seperated by spaces, so you may need quotes if there are spaces in the path.

Link to comment
Share on other sites

So this syntax will let the cmd file use the value of %01% from the original INF?

Meaning if %01% is d:\, then in this case the xcopy.cmd would essentially be executing:

xcopy.exe d:\install %systemdrive%\install\ /s /c /q /h /y

Is that right?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...