Skip to content
⌘ NSIS Forum Archive

Does Sleep command necessary between two net start commands to start sql services

2 posts

Swapan Das#

Does Sleep command necessary between two net start commands to start sql services

Hello Everybody,

Can anyone please clarify if I remove the 'sleep' between the two net start commands, will there is a risk of starting of 2nd service without the 1st one gets finished.


nsExec::Exec "cmd /C NET START MSSQLSERVER"
Sleep 9000
nsExec::Exec "cmd /C NET START SQLBROWSER"
Sleep 9000


Regards,
Afrow UK#
Assuming the 2nd one (sqlbrowser) is dependent on the 1st, a 2-3 second wait should br sufficient. If you want to be safe, use 9 and put a banner to tell the user what is happening.

Also, using "cmd" hard coded like that won't work on Win9x where it is command.com (assuming you want it to work on Win9x). Search the forum for COMSPEC.

Stu