Skip to content
⌘ NSIS Forum Archive

ExecWait

3 posts

aj kwak#

ExecWait

after the installation i must start a service (filedisk)
but i could happen that the service do not want to start.
so i use
ExecWait '"net start filedisk"'
so if the service failed i must reboot.
But how can i know that the service failed?
aj kwak#
i found this :
* script/remove_postmaster_pid.sh: postmaster.pid is only removed when
the postmaster service is not running; calling ipcclean in addition
to removing postmaster.pid; restarting if net start postmaster is
not successful

on :


but i cant implement it.
Afrow UK#
Try ExecWait '"net start filedisk"' $R0
$R0 will contain the exit code of the program.

Edit: You should call net under command because I remember that some of its functions did not work correctly if it wasn't called using command.

ReadEnvStr $R0 COMSPEC
ExecWait '"$R0" /C "net start filedisk"' $R0

-Stu