Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Link To Create Desktop Shortcut?

Recommended Posts

Is there a way to make a link that actually creates a desktop shortcut? I have a page that gives links to files on our intranet but I know of people who try and make shortcuts for these files. It would be nice if I could put a link next to the link for the file that would make a shortcut.

Notice from Johnny:
Use a more descriptive topic title next time.
Edited by Johnny (see edit history)

Share this post


Link to post
Share on other sites

I don't think it would be possible. You'd have to figure out the path to the desktop. On Windows this is C:\Documents and Settings\%USERNAME%\Desktop, I don't remember Linux's, and something else on Mac. You can get the OS with PHP's $_SERVER['HTTP_USER_AGENT'], but I don't think it's possible to write a file to the desktop.You could always just tell people to drag their link to the desktop.

Notice from KuBi:
Edit as per requested.
Edited by KuBi (see edit history)

Share this post


Link to post
Share on other sites

I'm sure there's a php script out there which could get the operating system of a user and I'm sure you could use fopen(), fwrite(), and fclose() to create the shortcut. I'm not sure it that's actually works, but you put the following code into notepad:

 

start http://mysite.somehost.com/

and save it as an open.exe and run it and if memory serves this should act as a shortcut. I'm not promising that it will work, it's just something I remember reading :D Just read Command Prompt help guide and now I'm 90% sure it will.

 

C:\Documents and Settings\%USERNAME%\Desktop

It's easier than that to find out the path to a Windows user's desktop. It's %USERPROFILE%\Desktop. This takes out the trouble of finding out the user's username which would probably require ActiveX.

Share this post


Link to post
Share on other sites

I Think Build key for acess to web on desktop is good Idea
I build one project with VB and i make it
Just build one (.url) file in vb and then put your link on this file :

[DEFAULT]URL=Your site Your . Put Url
Modified=0007A9F3A2F7C40101

And then Put this file on Your site for user downloads
But afther You must write one String to find Desktop address on user systems :D Its not hard , :D

Share this post


Link to post
Share on other sites

You can simply create a shortcut from windows and then upload the shortcut file to your site.


  • Right click on desktop.
  • Select New > Shortcut
  • Put your URL in the space, click Next and then Finish
  • Upload this shortcut to your site

Note: the shortcut extention is ".Url"

Share this post


Link to post
Share on other sites
send shortcut to desktop button on my websiteLink To Create Desktop Shortcut?

I made the shortcut on my desktop according to the previous post, but I don't understand what to do with it now. And I still don't know how to make a button that will send this shortcut to somebody's desktop when they press it. Here is an "add to favorites button" that I have. Can anybody edit this to be a "send shortcut to desktop"?

<input id="btnBookmark" type="button" value="Add to favorites" onclick="window.External.AddFavorite(location.Href, document.Title);">

And isnt there any way to make a better shortcut image? It's just a plain paper icon with my tiny favicon on it.

Any help would be greatly appreciated. I have been looking for this code for a while and apparantly nobody is doing it.-question by stephen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.