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
- :
- Creating shortcut to folder
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jul 06, 2011
07:12 AM
Creating shortcut to folder
I want to create a shortcut to a folder that gets installed. I've searched and done what was suggested but still no shortcut.
I have a directory named "Reports" in TARGETDIR.
I want to create a shortcut to "Reports" in a folder named "MyApp" on the desktop.
This is what I tried. It creates a shortcut, but the shortcut is a file type shortcut and not a folder shortcut.
szFolder = TARGETDIR ^ "Reports";
LongPathToQuote(szFolder,TRUE);
AddFolderIcon(
FOLDER_DESKTOP ^ "MyApp",
"Reports Shortcut",
szFolder,
"",
"",
0,
"",
NULL);
I have a directory named "Reports" in TARGETDIR.
I want to create a shortcut to "Reports" in a folder named "MyApp" on the desktop.
This is what I tried. It creates a shortcut, but the shortcut is a file type shortcut and not a folder shortcut.
szFolder = TARGETDIR ^ "Reports";
LongPathToQuote(szFolder,TRUE);
AddFolderIcon(
FOLDER_DESKTOP ^ "MyApp",
"Reports Shortcut",
szFolder,
"",
"",
0,
"",
NULL);
(6) Replies
‎Jul 06, 2011
10:40 AM
How will that put the shortcut in a desktop folder?
In my install I need to create a folder named "MyApp" on the desktop. Inside this folder I want a shortcut to another folder named "Reports".
In my install I need to create a folder named "MyApp" on the desktop. Inside this folder I want a shortcut to another folder named "Reports".
‎Jul 06, 2011
12:40 PM
szProgramFolder = FOLDER_DESKTOP ^ "MyApp";
szCommandLine = TARGETDIR^"Reports";
szItemName = "Reports Shortcut";
szWorkingDir = TARGETDIR^"Reports";
szIconPath = WINDIR^"system32\\SHELL32.dll";
nIcon = 4;
szShortCutKey = "";
nFlag = REPLACE|RUN_MAXIMIZED; //can be anything according to your wish
nResult = AddFolderIcon (szProgramFolder, szItemName, szCommandLine,
szWorkingDir, szIconPath, nIcon,
szShortCutKey, nFlag);
I avoided LongPathToQuote(szFolder,TRUE) and it still worked.Try with that too...
Hope this helps...
szCommandLine = TARGETDIR^"Reports";
szItemName = "Reports Shortcut";
szWorkingDir = TARGETDIR^"Reports";
szIconPath = WINDIR^"system32\\SHELL32.dll";
nIcon = 4;
szShortCutKey = "";
nFlag = REPLACE|RUN_MAXIMIZED; //can be anything according to your wish
nResult = AddFolderIcon (szProgramFolder, szItemName, szCommandLine,
szWorkingDir, szIconPath, nIcon,
szShortCutKey, nFlag);
I avoided LongPathToQuote(szFolder,TRUE) and it still worked.Try with that too...
Hope this helps...
‎Jul 13, 2011
07:45 AM
No it has not. It creates a shortcut and it looks like a folder shortcut, but when I double-click it is actually looking for a program. When I go to the Properties of the shortcut the Target Type is still 'File'.
Is I manually create a shortcut to that folder, the Target Type is 'File folder'.
Is I manually create a shortcut to that folder, the Target Type is 'File folder'.