Summary
This article explains how to resolve the issue where the 'Open With' Windows dialog box opens, instead of the folder if you used the InstallScript function AddFolderIcon to create a shortcut to a folder.
Synopsis
In some cases, if you used the InstallScript function AddFolderIcon to create a shortcut to a folder, and then you launch the shortcut that is created at run time on the target system, the 'Open With' Windows dialog box opens, instead of the folder. This article explains how to resolve this issue.
Discussion
In order to successfully use AddFolderIcon to create a shortcut to a folder, the folder must exist before AddFolderIcon is called; otherwise, the aforementioned behavior occurs.
Workaround
To resolve this issue, use the InstallScript function Is with the PATH_EXISTS parameter to check if the shortcut target exists before using AddFolderIcon to create the shortcut. If the shortcut target does not exist, you can call CreateDir to create the folder. For example:
if(!Is(PATH_EXISTS, szShortcutTarget)=1) then
CreateDir(szShortcutTarget);
endif;
AddFolderIcon(szProgramFolder, szItemName, szCommandLine, szShortcutTarget, szIconPath, nIcon, szShortCutKey, NULL );
Additional Information
For more information, see AddFolderIcon. Starting with InstallShield 2013 there is a new function CreateShortcut that supersedes AddFolderIcon.
Related Articles
Create a Shortcut Using Installscript Based on User Input and Delete The Shortcut on Uninstalling The Installer 9Number of Views Empty Folders Not Created Using Dynamic File Linking 14Number of Views Unable to Open Projects in Previous Versions of Installshield 7Number of Views FlexNet Code Insight Too Many Open Files Error 8Number of Views Ability to Open Requests in new tab in FlexNet Code Insight 5Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago