|
|
#1 |
|
Junior Member
Join Date: Jun 2001
Posts: 2
|
Hi:
Have a look at this scripts which setup start menu links: ... SetOutPath $SMPROGRAMS\MyApp CreateShortCut "$SMPROGRAMS\MyApp\MyApp.lnk" "$INSTDIR\MyApp.exe" ... After installation, MyApp.exe may not work from the Start menu, since the working directory is pointing to $SMPROGRAMS, that was the $OUTDIR, not the $INSTDIR. IMHO this is a not healthy logic, because most app will not be happy to work in $SMPROGRAMS. So it maybe helpful to set a $WORKDIR for CreateShortCut instruction to do it right. P.S. Interestingly, this instruction do things right when creating desktop shortcuts, the working directory was set to $INSTDIR... |
|
|
|
|
|
#2 |
|
Member
|
hi
If you use SetOutPath in adiition with CreateShortCut then SetOutPath sets the workingdirectory, nothing else. Simply set it to $INSTDIR and everything should work fine. try it like this code: cu yzo |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2001
Posts: 2
|
thanks yazno,
but I'm afraid that the CreateShortCut behaves not as what you described, I tried your suggested code, but the installer just outputs alotof error msg like this: -------------------------------------------------------------------------------- Error creating shortcut: C:\Windows\Start Menu\Programs\MyApp\MyApp.lnk -------------------------------------------------------------------------------- I found if without issue this line first: SetOutPath $SMPROGRAMS all the following $SMPROGRAMS\*.lnk shortcuts always failed, but with this line, MyApp.exe shortcut's working directory will also be the $SMPROGRAMS. do we have a dilemma here? Pardon me for mentioning this again, the following desktop shortcut script works: -------------------------------------------------------------------------------- SetOutPath $INSTDIR CreateShortCut "$DESKTOP\MyApp.lnk" "$INSTDIR\MyApp\MyApp.exe" -------------------------------------------------------------------------------- the exe working directory was set to $INSTDIR accurately, but the same logic above won't apply to $SMPROGRAMS shortcut setting. maybe it's the time to re-think why the CreateShortCut instruction behave this way... ![]() |
|
|
|
|
|
#4 |
|
Member
|
hi,
no need to re-think this. you have to create the MyApp directory in the $SMPROGRAMS folder _before_ creating the Shortcut! sorry, i thought you knew that. so this should work: code: cu yzo |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2001
Location: Melbourne, Australia
Posts: 207
|
My point, exactly.
For some reason, on certain systems, the directory needs to be created. I think this is a bug, most definitely, since on some systems this isn't required. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|