Custom shortcuts

  • Print

If you wish to allow that the end user select where he wishes to create shortcuts for your application deployed with Setup Factory, then you might want to consider this custom screen:

How to use

  • Download the installer below and select the desired package for installation. The files will be deployed in:

    For Windows XP:
    C:\Documents and Settings\All Users\Application Data\IndigoRose\Setup Factory\9.0\Screens\

    For Windows Vista or Windows 7:
    C:\ProgramData\IndigoRose\Setup Factory\9.0\Screens\

  • The next thing you need to do is clearing all checkmarks for the application in the Location setting of Setup Factory:
  • Now add the Create Icons custom screen to your project:
  • Of course, the appearance of the screen depends on your current theme you selected in your project.

    You can control the captions, and the options in the settings of the screen. Just delete the options you don't want or change the texts to be displayed to the end user:

  • Finally, you will need to create the shortcuts that were requested by the user. For this, add this piece of code to your On Post Install script, and adapt as necessary:
 
-- create icons/shortcuts according to the user choices
if (desktop_icon) then
    local iconfolder = Shell.GetFolder(SHF_DESKTOP);
    Shell.CreateShortcut(iconfolder, SessionVar.Expand("%ProductName%"),
        SessionVar.Expand("%AppFolder%\\Sample.exe"), "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 
if (startup_icon) then
    local iconfolder = Shell.GetFolder(SHF_STARTUP);
    Shell.CreateShortcut(iconfolder, SessionVar.Expand("%ProductName%"),
        SessionVar.Expand("%AppFolder%\\Sample.exe"), "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 
if (quicklaunch_icon) then
    local iconfolder = SessionVar.Expand("%ApplicationDataFolder%") ..
        "\\Microsoft\\Internet Explorer\\Quick Launch";
    Shell.CreateShortcut(iconfolder, SessionVar.Expand("%ProductName%"),
        SessionVar.Expand("%AppFolder%\\Sample.exe"), "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 
if (startmenu_icon) then
    local iconfolder = Shell.GetFolder(SHF_STARTMENU);
    Shell.CreateShortcut(iconfolder, SessionVar.Expand("%ProductName%"),
        SessionVar.Expand("%AppFolder%\\Sample.exe"), "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 
if (programs_icon) then
    local iconfolder = Shell.GetFolder(SHF_STARTMENUPROGRAMS);
    Shell.CreateShortcut(iconfolder, SessionVar.Expand("%ProductName%"),
        SessionVar.Expand("%AppFolder%\\Sample.exe"), "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 
if (appfolder_icon) then
    local iconfolder = Shell.GetFolder(SHF_STARTMENUPROGRAMS);
    Shell.CreateShortcut(iconfolder .. SessionVar.Expand("\\%AppShortcutFolderName%"),
        SessionVar.Expand("%ProductName%"), SessionVar.Expand("%AppFolder%\\Sample.exe"),
        "", "", "", 0, SW_SHOWNORMAL, nil, "");
end
 

Download

Custom Screens for Setup Factory 9

Click to downloadFile size: 1.92 MB
Current version: 1.0.2.0
Updated: February 2013

Windows 7 or later:
The Quick Launch bar is no longer shown by default on the taskbar after a fresh install of Windows 7. In order to get the bar back, so Quick Launch icons show up correctly, it may be required to recreate the bar first. You can find instructions on several sites, like How-To Geek.

Please remember that all shortcuts created with scripting must be removed manually during the uninstallation - don't forget to add the actions to your On Pre Uninistall.

Don't have Setup Factory?

If you want to purchase a license for Setup Factory 9, now is a good time! You can get 10% off the list price simply by clicking the banner below:

 

Add a comment (For questions, please use the contact form!)

Security code
Refresh

Our Plugins & Examples Feed

  • POP3 Actions plugin released

    A new, free actions plugin was released today. With it, the developer can check POP3...

  • Reminder: Update Serial Number Validation and/or Subscription Validation

    Next week IPInfoDB's API 2.0 will stop working. If you use an older version than...

Subscribe now!

Advertisement