
Help changing internet shortcut icon
Posted 07 August 2001 - 21:05
Posted 07 August 2001 - 22:29
Anyway, make sure you do not call LongPathToQuote for the icon path.
Posted 07 August 2001 - 23:53
Quote |
Quote: from Stefan Krueger on 3:29 pm on Aug. 7, 2001 I'm surprised that you were able to create a URL shortcut with AddFolderIcon. I thought that was impossible. Anyway, make sure you do not call LongPathToQuote for the icon path. |
I 'm using LongPathToQuote because the file is on the users system. I've compiled some VC++ code using IShellLink to change the icon and it does the same thing.
The internet shortcut just points to an html file on the users system. Maybe that makes a difference. I haven't tried it to an actual website url.
Posted 08 August 2001 - 12:50
Anyway, don't call LongPathToQuote for the icon path. From AddFolderIcon help:
Do not call LongPathToQuote for the expressions passed as the parameters szWorkingDir and szIconPath. InstallShield automatically encloses these paths in quotation marks.
Posted 08 August 2001 - 22:46
You can create an Internet shortcut if you have the URL of the page to which you want to link:
Create an instance of the Internet shortcut object with CoCreateInstance, using a CLSID of CLSID_InternetShortcut.
Use the IUniformResourceLocator::SetURL method to set the URL in the shortcut.
Use the IPersistFile::Save method to save the shortcut file to a desired location.
Posted 08 August 2001 - 23:53
Blake,
That is what I was doing in the VC++ code and it still has the problem. It works with the IS call so I don't need to do it with an exe now. I was using some wrapper classes from www.codeproject.com in the shell programming section. If anyone needs to create an internet shortcut to an actual website and IS can't do it, then I'd suggest looking there.
(Edited by troy at 4:54 pm on Aug. 8, 2001)