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
- :
- Manually Create Shortcut on Desktop for 64 bit OS Can't find it
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
‎Jul 09, 2013
10:52 AM
Manually Create Shortcut on Desktop for 64 bit OS Can't find it
Hi all,
I hope someone can help me.
i m using the following code:
version 1:
AddFolderIcon( FOLDER_DESKTOP, sShortcutText, "\"" + INSTALLDIR ^ "myapplication.exe\"", INSTALLDIR, INSTALLDIR ^ "shortcut.ico", 0, "", NULL);
After installation the icon is the exe file icon and not the (INSTALLDIR ^ "shortcut.ico").
if you right click, go to properties and click "Change Icon..." you get an error: "%ProgramFiles%\MyAppPath\shortcut.ico does not exist." but the icon exist in "%ProgramFiles% (x86)\MyAppPath\shortcut.ico".
version 2 (put the fullpathname of the icon in quotes) :
AddFolderIcon( FOLDER_DESKTOP, sShortcutText, "\"" + INSTALLDIR ^ "myapplication.exe\"", INSTALLDIR, "\"" + INSTALLDIR ^ "shortcut.ico\"", 0, "", NULL);
The icon is blank until you go to properties and click "Change Icon...", you do not have to do anything more because the path is the right one: "%ProgramFiles% (x86)\MyAppPath\shortcut.ico".
BUT, you still have to go to properties and click "Change Icon...". 😞
Now Flexera help says, for the icon's full path:
"Do not call LongPathToQuote to enclose this file name in quotation marks. InstallShield automatically encloses these paths in quotation marks."
If you do not put quotes is passing the wrong path, but even if you put the icon stays blank even after restart of the computer.
Can somebody help here, PLEASE?
Thank you
Alex
I hope someone can help me.
i m using the following code:
version 1:
AddFolderIcon( FOLDER_DESKTOP, sShortcutText, "\"" + INSTALLDIR ^ "myapplication.exe\"", INSTALLDIR, INSTALLDIR ^ "shortcut.ico", 0, "", NULL);
After installation the icon is the exe file icon and not the (INSTALLDIR ^ "shortcut.ico").
if you right click, go to properties and click "Change Icon..." you get an error: "%ProgramFiles%\MyAppPath\shortcut.ico does not exist." but the icon exist in "%ProgramFiles% (x86)\MyAppPath\shortcut.ico".
version 2 (put the fullpathname of the icon in quotes) :
AddFolderIcon( FOLDER_DESKTOP, sShortcutText, "\"" + INSTALLDIR ^ "myapplication.exe\"", INSTALLDIR, "\"" + INSTALLDIR ^ "shortcut.ico\"", 0, "", NULL);
The icon is blank until you go to properties and click "Change Icon...", you do not have to do anything more because the path is the right one: "%ProgramFiles% (x86)\MyAppPath\shortcut.ico".
BUT, you still have to go to properties and click "Change Icon...". 😞
Now Flexera help says, for the icon's full path:
"Do not call LongPathToQuote to enclose this file name in quotation marks. InstallShield automatically encloses these paths in quotation marks."
If you do not put quotes is passing the wrong path, but even if you put the icon stays blank even after restart of the computer.
Can somebody help here, PLEASE?
Thank you
Alex
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2013
03:37 PM
A couple of comments (but not really an answer).
1) I recently came across this note to the MSI Icon table which indicates that the Windows Shell requires that if an icon file is used, the extension must be the same as the application (EXE and not .ico). We have always used .ico file and fought with strange behavior of the OS, which may be explained by this comment. I plan to use a MyAppIcon.exe file in the future to deploy the shortcuts icon.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa369210(v=vs.85).aspx
2) Windows has an Icon Cache which sometimes gets out of sync and has to be cleared (probably due in part to the above issue). It has been a while since I had to do anything with this, but you might want to look at it.
Recreate the Icon-Cache file by deleting it
Delete the hidden file ShellIconCache (Win9x/NT4/2k):
C:\Windows\ShellIconCache or C:\Winnt\ShellIconCache
Note in WinXP each user has their own file that is called Iconcache.db:
C:\Documents and Settings\Your User Name\Local Settings\Application Data\Iconcache.db
Note in Vista each user has their own file that is called Iconcache.db:
%USERPROFILE%\AppData\Local\Iconcache.db
1) I recently came across this note to the MSI Icon table which indicates that the Windows Shell requires that if an icon file is used, the extension must be the same as the application (EXE and not .ico). We have always used .ico file and fought with strange behavior of the OS, which may be explained by this comment. I plan to use a MyAppIcon.exe file in the future to deploy the shortcuts icon.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa369210(v=vs.85).aspx
2) Windows has an Icon Cache which sometimes gets out of sync and has to be cleared (probably due in part to the above issue). It has been a while since I had to do anything with this, but you might want to look at it.
Recreate the Icon-Cache file by deleting it
Delete the hidden file ShellIconCache (Win9x/NT4/2k):
C:\Windows\ShellIconCache or C:\Winnt\ShellIconCache
Note in WinXP each user has their own file that is called Iconcache.db:
C:\Documents and Settings\Your User Name\Local Settings\Application Data\Iconcache.db
Note in Vista each user has their own file that is called Iconcache.db:
%USERPROFILE%\AppData\Local\Iconcache.db
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 10, 2013
06:57 AM
Thanks for replying.
I tried to target an exe file instead of an ico file, it didn't work.
I tried to run a script to refresh the icon cash, it didn't work ether.
The script
set iconcache=%localappdata%\IconCache.db
echo The Explorer process must be killed to delete the Icon DB.
echo Please SAVE ALL OPEN WORK before continuing.
pause
If exist "%iconcache%" goto delID
echo Icon DB has already been deleted.
pause
exit /B
:delID
echo Attempting to delete Icon DB...
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
del "%iconcache%" /A
echo Icon DB has been successfully deleted. Please "restart your PC" now to rebuild your icon cache.
start explorer.exe
pause
exit /B
I also tried changing the icon file and combine all three different case, but, no luck.
So, still no answer. 😞
I tried to target an exe file instead of an ico file, it didn't work.
I tried to run a script to refresh the icon cash, it didn't work ether.
The script
set iconcache=%localappdata%\IconCache.db
echo The Explorer process must be killed to delete the Icon DB.
echo Please SAVE ALL OPEN WORK before continuing.
pause
If exist "%iconcache%" goto delID
echo Icon DB has already been deleted.
pause
exit /B
:delID
echo Attempting to delete Icon DB...
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
del "%iconcache%" /A
echo Icon DB has been successfully deleted. Please "restart your PC" now to rebuild your icon cache.
start explorer.exe
pause
exit /B
I also tried changing the icon file and combine all three different case, but, no luck.
So, still no answer. 😞
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)