launch on start up
I amusing the modern UI. How do I add the application to launch at start up. I can not find any examples with the modern UI. Please help. Thanks in advance.
8 posts
CreateShortCut "$SMPROGRAMS\Startup\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" "" And this line in the delete shortcuts area of the uninstaller Delete "$SMPROGRAMS\Startup\${MUI_PRODUCT}.lnk" BTW In future could you attach long scripts rather than posting them.
Function ".onInit"
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Startup"
StrCmp $0 "" +1 +2
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Startup"
Messagebox MB_OK $0
Quit
FunctionEnd
SetShellVarContext current|allBecause permissions problems, you shouldn't allow non admins to install your software, btw, other installers like MS installer don't permit. :P
Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo Plugin. See Contrib\UserInfo\UserInfo.nsi for an example.
Originally posted by kichikYou right 😛. Forgot that 😁
$SMSTARTUP is easier than reading the registry.