I want to open an administrative CMD window using Inno Setup and want to install:
nssm install metabase
I tried the following function, but it doesn't work.
Exec(ExpandConstant('{cmd}'), ' nssm install', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Please someone help me. Thank you in advance.
You are effectively executing:
cmd nssm install
That wouldn't work anywhere, not only in Inno Setup. It should be:
cmd /c nssm install
Though, it's an overkill to run nssm
via cmd
. Run it directly:
nssm install
In Inno Setup Pascal Script:
Exec('nssm', 'install', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);