Archive: Shortcuts in the all users start menu group


Shortcuts in the all users start menu group
Hi!

Can you please add an option to put shortcuts into the all users start menu group?

TIA
KiCHiK


Solution
I know it's a bit of a workaround but here is the code that I created to do this:

;Create Shortcut
IfFileExists "$WINDIR\Profiles\All Users\Start Menu\Programs" NTShortcut
CreateDirectory "$SMPROGRAMS\MyAppDir"
CreateShortCut "$SMPROGRAMS\MyAppDir\myApp.lnk" "$INSTDIR\myApp.exe" "" "$INSTDIR\myApp.exe" 0
Goto InstallComplete
NTShortcut:
CreateDirectory "$WINDIR\Profiles\All Users\Start Menu\Programs\myAppDir"
CreateShortCut "$WINDIR\Profiles\All Users\Start Menu\Programs\myAppDir\myApp.lnk" "$INSTDIR\myApp.exe" "" "$INSTDIR\myApp.exe" 0
InstallComplete:

Hope that helps,

Matt.



ReadRegStr $OUTDIR HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common Programs"
StrCmp $OUTDIR "" nocommon
CreateShortCut $OUTDIR\MyLink.lnk ...
nocommon:
SetOutPath $INSTDIR ; restore $OUTDIR


-Justin

thanks