Archive: Internet Shortcut Icon


Internet Shortcut Icon
Hi, How to show icon for the internet shortcut.


WriteINIStr "$SMPROGRAMS\MyApp\Shortcut.url" "InternetShortcut" "URL" "http://mywebsite.com"

-Stu


Hi I want to display a icon instead of internet explorer icon for the shortcut.


Not possible as far as I am aware.

-Stu


WriteINIStr "$SMPROGRAMS\MyApp\Shortcut.url" "InternetShortcut" "URL" "http://mywebsite.com"
WriteINIStr "$SMPROGRAMS\MyApp\Shortcut.url" "InternetShortcut" "IconFile" "$INSTDIR\file.dll"
WriteINIStr "$SMPROGRAMS\MyApp\Shortcut.url" "InternetShortcut" "IconIndex" "0"

file could also be .exe or .ico

BTW, never tried by me using NSIS... Just guessing (again) ;)

++Vitoco

You're right. Googled for InternetShortcut and IconFile and came up with some results.

-Stu


I've just googled for your keywords, and the first result is a NSIS macro :eek:

So, the answer was in the Wiki!


Hi, I'm using

WriteINIStr "$SMPROGRAMS\MyApp\Shortcut.url" "InternetShortcut" "URL" "http://mywebsite.com"

to add an internet shortcut to my website, right.
The problem is, IconFile and IconIndex keeps adding by itself!!!
It adds http://mywebsite.com/favicon.ico as the IconFile and 1 as the Icon Index, it looks like this:

IconFile=http://mywebsite.com/favicon.ico
IconIndex=1

Why does this keep adding itself? I didn't put that crap in there and I don't want it!


It's probably a feature of Internet Explorer that sets the shortcut's icon to the icon the website defines. I'd guess the only workaround is defining your own icon.


well NSIS's own installer doesn't add that crap.


An update: I cleared out my Internet Explorer cache, and now the problem is solved! Crap isn't added!