Skip to content
⌘ NSIS Forum Archive

Problem executing a command line

6 posts

bambou51#

Problem executing a command line

I have problem executing command lines.
The following is working fine:

SetOutPath "$EXEDIR\DRIVERS\"
ClearErrors
ExecWait '"SETUP.EXE"' $0
IfErrors 0 +2
MessageBox MB_Ok "$(INSTALLATION_FAILURE)$0"

But this one with just an extra parameter failed:

SetOutPath "$EXEDIR\DRIVERS\"
ClearErrors
ExecWait '"SETUP.EXE /USB"' $0
IfErrors 0 +2
MessageBox MB_Ok "$(INSTALLATION_FAILURE)$0"

with the code 1...
any idea ?
bambou51#
Thanks now it works.
I still have a similar problem, when creating a shortcut with parameters:

CreateShortCut "$DESKTOP\${APPNAME}.lnk" '"$Folder\Prog.exe" /config'

Shortcut is created with the following command line:
c:\myfilder\Prog.exe config

No more '/'. Do I have to escape this character and how ?
Afrow UK#
!define MUI_FINISHPAGE_RUN "$FOLDER_FOLDER\Prog.exe"
!define MUI_FINISHPAGE_RUN_PARAMETERS "/config"

It helps if you read the docs more thoroughly.

-Stu