Question

I'd like to be able to give our users an option to create a desktop shortcut to our web site. I've done some research and found a number of articles using ActiveX to access the Shell API for Windows to perform this activity, but I'm curious as to whether there is a way to do it that is built into the browser that I might be missing that would be more portable than the ActiveX route.

Was it helpful?

Solution

There is no built in way of doing this in the web browser. You're website has not way of interacting with anything but the browser, by default. You can go the ActiveX route, but that would only be supported by users running Internet Explorer. You could try and do it through Java, but you will likely run into security and trust issues. I would suggest you recommend your users just bookmark your page, or give them step by step instructions on how to create the shortcut themselves.

OTHER TIPS

If by portable you mean portable across web browsers then I think you won't find a solution. Any security conscious browser would not allow this.

If by portable you mean portable across operating systems then I think you still won't find a solution. Partly because of the above reason, partly because not all operating systems and desktop environments support desktop icons/shortcuts at all.

How about doing something like the following:

Put a file google.URL available at your web site with contents like

[InternetShortcut]
URL=http://www.google.com

And then asking your users to save the file on their desktop (Right click -> Save as...).

I tried this fast and only problem was that by default my WinXP was saving it as a text file, adding .txt to the end of the file name. So this would require users to select "All files" when saving. I think one could probably fix this with MIME types?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top