Archive: Problems with executing shortcuts with ExecWait


Problems with executing shortcuts with ExecWait
  I'm attempting to create a shortcut so I can run a command minimized during the install and run that shortcut. My code looks like follows:

CreateShortCut"$TEMP\\1.lnk" "notepad" "" "" "" SW_SHOWMINIMIZED

ExecWait '"$TEMP\\1.lnk"'
>IfErrors "" +2
MessageBox MB_YESNO
|MB_ICONQUESTION "error executing 1" IDYES ""
The log looks like:
Create shortcut: "C:\\DOCUME~1\\user\\LOCALS~1\\Temp\\1.lnk"


>Execute: "C:\\DOCUME~1\\user\\LOCALS~1\\Temp\\1.lnk"
The message box appears with the error text and notepad does not run. Copying and pasting "C:\DOCUME~1\user\LOCALS~1\Temp\1.lnk" into a command prompt will run notepad however.

I have tried creating the shortcut in $INSTDIR and have tried different targets for the shortcut and I can't execute any of them. Any suggestions?

Thanks.

Try using ExecShell with "open".


Thanks, that worked.