simulation
22nd April 2008 11:29 UTC
execwait doesn't wait in Vista
I am using execwait to launch a batch file that copies some files from a network location and then runs a setup program.
XP works fine, but under Vista the nsis installer just continues after a couple of seconds while the files are still being copied in the DOS window?
I was also experiencing the similar problem with nsExec::
kichik
22nd April 2008 11:32 UTC
You can use CopyFiles to copy files.
As for not waiting - you should execute and wait for cmd.exe, or better yet - %COMSPEC%, as .bat files are not really executables.
simulation
22nd April 2008 12:12 UTC
Thanks for the quick reply.
I have just tested the comspec method
ReadEnvStr $3 COMSPEC
ExecWait '"$3" /K r:\latest\installcam.cmd'
Again, this works fine on XP, but still continues after a few seconds in Vista whilst the command window is still open?
Any suggestions?
Anders
22nd April 2008 12:18 UTC
/K means keep open after the batch is done, try /C and see if maybe your batch file has a bug
kichik
22nd April 2008 12:18 UTC
Try throwing Vista out the window. That might help.
Frustration based humor aside, my best suggestion is that you don't use a batch file and use CopyFiles. If you really must use a batch file, give me something to test this on so I can reproduce and check it with my own eyes.