vaine0
Posts: 14
Joined: Wed Jul 09, 2008 11:40 pm

Removing the shortcut folder

I can't seem to figure out how to remove the shortcut folder from start menu, given the scenario where the user chooses not to have any shortcuts installed via the shortcuts dialog. Any help would be greatly appreciated.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Removing the shortcut folder

Hi,

You can uncheck the option "Create folder on target machine" in the "Edit Folder" dialog for the Application Shortcut Folder (select "Properties" from its context-menu in the Files and Folders page in order to open the dialog).

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
vaine0
Posts: 14
Joined: Wed Jul 09, 2008 11:40 pm

Re: Removing the shortcut folder

We would like the shortcut folder to be created on the user's machine if they choose to create shortcuts. However, we would not like an empty folder to be sitting on their disk if they choose to have no shortcuts installed. Will doing what you described above prevent the folder to be created, EVEN if they want to have the shortcuts installed? (Thats the impression I was under.)
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Removing the shortcut folder

Hi,
Will doing what you described above prevent the folder to be created, EVEN if they want to have the shortcuts installed?
No, that option on the "Application Shortcut Folder" properties tells Windows Installer to create the folder explicitly for a particular component (the folder will be created even if it's empty). If this option is not specified then the folder will be created by the shortcut.

You can read more here:
http://msdn.microsoft.com/en-us/library/aa368053.aspx

Best Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
vaine0
Posts: 14
Joined: Wed Jul 09, 2008 11:40 pm

Re: Removing the shortcut folder

Ok... that was the impression I was under. How, then, do we prevent an empty start->programs->myGame from being created when no shortcuts are installed?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Removing the shortcut folder

Hi,
How, then, do we prevent an empty start->programs->myGame from being created when no shortcuts are installed?
Note that only shortcuts from "Application Shortcut Folder" ("Files and Folders" page) are conditioned from "ShortcutsDlg". The default location for this folder can be configured in "Install Parameters" page.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Removing the shortcut folder

vaine0 wrote:Ok... that was the impression I was under. How, then, do we prevent an empty start->programs->myGame from being created when no shortcuts are installed?
Hello vaine0,

maybe it is acceptable to you to delete the empty shortcuts folder, at the end of the installation? The user won't notice the difference.

You could do this in a custom action, written in JScript or VBScript. You would retrieve the property with the shortcut menu path, the product name (or whatever is necessary to complete the absolute path to the shortcut menu directory of your application) and then use FilesystemObject.DeleteFolder (or so) to remove that.



With best regards

Clemens Anhuth

Return to “Common Problems”