Reputation: 53
I would like to make it possible for our unsavvy website users to create a desktop link to our website with a custom icon (our website icon). Naturally, there is the drag-and-drop option, but this doesn't allow a custom icon (as far as I know). I can also go for an exe installer file, but this seems over the top for what I need - just a simple desktop link + icon.
Any ideas?
I need this working for Windows and Mac (but doesn't have to be the same solution for both).
Thanks.
Upvotes: 5
Views: 11259
Reputation: 31
If you are OK creating an EXE file you can do it with a small batch script, which can be converted to an EXE to contain the icon file.
In Notepad, write a line with the following text in it:
start http://www.domain.com
then save the file with a .bat extension, e.g. save it as launch.bat
http://www.f2ko.de/programs.php?lang=en&pid=b2e
The BAT runs a little shell script to open the browser, so there's a flash of the command line interface, but it disappears and the URL opens.
Upvotes: 3
Reputation: 4527
I thought this was interesting so I looked into bookmarks with custom icons on Windows Vista.
A bookmark is just a text file with a .url extension containing the following:
[InternetShortcut]
URL=http://forum.lxcenter.org/index.php?t=msg&goto=89304&#msg_89304
IconFile=C:\Users\Carl\AppData\Local\Google\Chrome\Application\chrome.exe
This example has custom icon, otherwise only the URL entry would be there. There's other optional values like hotkey that can go in as well.
I tried changing IconFile
to point to an online resource (a favicon.ico) but it didn't work. Probably a security feature to keep out online nasties. So it looks like you would need the user download your icon file seperately, which sounds like too much for your target user.
The solution I would pursue would be to use a compiled language to create a standalone .exe file that has the icon you want embedded, and just loads the default web browser with the appropriate page. I don't do desktop apps, but I assume this shouldn't be too much harder than a hello world so I'd try that route.
Upvotes: 3