This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Changing start menu folder name
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
08:24 AM
Changing start menu folder name
Hi,
How do you use the SelectFolder() dialog to allow the user to select the name of the folder in the start menu where the programs shortcuts are placed, in such a way that I can use the automation/COM interface to add such shortcuts. For example, if I put the following in the OnFirstUI() function:
nResult = SelectFolder("Title", "Default folder", szFolderName);
...
CreateProgramFolder(szFolderName);
Then how do I place shortcuts in that folder using the COM interface?
folder = ???
folder.AddShortcut("my shortcut")
Somehow I must refer to the result from the SelectFolder() dialog, but how? Is it possible to do something like this:
folder = project.ISWiFolders.Item("").SubFolders.Item("").SubFolders.Item("").SubFolders.Item("")
folder.AddShortcut(...)
I find it a little strange that this would be so difficult, I imagined that it would be a standard option to add a folder selection wizard.
How do you use the SelectFolder() dialog to allow the user to select the name of the folder in the start menu where the programs shortcuts are placed, in such a way that I can use the automation/COM interface to add such shortcuts. For example, if I put the following in the OnFirstUI() function:
nResult = SelectFolder("Title", "Default folder", szFolderName);
...
CreateProgramFolder(szFolderName);
Then how do I place shortcuts in that folder using the COM interface?
folder = ???
folder.AddShortcut("my shortcut")
Somehow I must refer to the result from the SelectFolder() dialog, but how? Is it possible to do something like this:
folder = project.ISWiFolders.Item("
folder.AddShortcut(...)
I find it a little strange that this would be so difficult, I imagined that it would be a standard option to add a folder selection wizard.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2008
12:30 PM
Before going down that road, is it an option for you to use the graphical Shortcuts view and use SHELL_OBJECT_FOLDER as the subfolder name, and at run time set SHELL_OBJECT_FOLDER to the value you obtain from SelectFolder or SdSelectFolder? You can then sidestep the need to add the shortcut to your project during each build...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 18, 2008
02:06 AM
RobertDickau wrote:
Before going down that road, is it an option for you to use the graphical Shortcuts view and use SHELL_OBJECT_FOLDER as the subfolder name, and at run time set SHELL_OBJECT_FOLDER to the value you obtain from SelectFolder or SdSelectFolder? You can then sidestep the need to add the shortcut to your project during each build...
Using the graphical interface to add the shortcuts is not an option; the entire installation is generated automatically from a specification file.
I need to be able to add the shortcut using the automation interface in a way that the name of the shortcut folder can be determined at runtime. I'm not sure if/how I can use SHELL_OBJECT_FOLDER to accomplish that.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 18, 2008
08:38 AM
As another option to avoid the extra step of using Automation for the shortcut, can you use AddFolderIcon in the script (after CreateProgramFolder) to create the shortcut in the user's selected location?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 18, 2008
09:00 AM
In theory, yes, but I would need to automatically generate installscript code to do this, and that is simply too much work to be worth it. Fortunately, our product manager agreed to remove the need for changing the folder name, so this is no longer an issue.
I still find it curious that a common operation such as changing the name of the program folder at runtime is not possible to do using the automation interface.
I still find it curious that a common operation such as changing the name of the program folder at runtime is not possible to do using the automation interface.