JamesKiller
4th May 2007 01:08 UTC
Execwait , how come it doesn't wait?
OMG, when i try to use execwait "'myservice.exe" -uninstall' to unregister the service,
cause unregistering the service takes a while, but execwait can't wait for it done, then continue to process to the next line...
Really don't why?
Joel
4th May 2007 01:27 UTC
Bad quotation!
ExecWait '"$INSTDIR\command.exe" parameters'. If you don't put it in quotes it will not work on Windows 9x with or without parameters.
JamesKiller
4th May 2007 17:16 UTC
sorry. I type it wrongly. Acctually, in my code like this:
Execwait '"$OldInstallDir\MyService.exe" -UnregServer'
but never wait for unregistered the service done, then go to next line?
why?
Joel
4th May 2007 18:59 UTC
Better use IfFileExists to detect the valid path file.
Are you 100% sure that $OldInstallDir\MyService.exe is there?
Maybe $OldInstallDir is wrong
JamesKiller
4th May 2007 19:10 UTC
yes, I am 100% sure that this files is in right folder. (cause' i used messagebox to show it up)....
the problem is that execwait acctually doesn't wait for the unregister done.
Weird.....
Red Wine
4th May 2007 20:13 UTC
Probably the '"MyService.exe" -UnregServer' all it actually does is to call a native windows service so ExecWait normally detects the end of MyService.exe thus there is nothing to wait.