Reputation: 2000
I have a batch file that needs to vbe excecuted, I am currently executing it using
Exec "$PLUGINSDIR\IISHelper.bat"
But while executing a black window is appearing which is not what is desired. I would like to run that batch file silently. So I tried
Exec "start $PLUGINSDIR\IISHelper.bat /B"
But while this runs silently this doesn't have the elevated permission as it does for the installer.
Upvotes: 2
Views: 3633
Reputation: 101764
The start
would not be silent if it worked but it does not because start is not a program, it is a internal command in cmd.exe.
Use the nsExec plug-in (part of the default NSIS installation) to hide the console window.
nsExec::Exec '"$sysdir\cmd.exe" /c if 1==1 "$PLUGINSDIR\IISHelper.bat"'
Pop $0
Upvotes: 8