Monday, August 22, 2011

How to create an Internet Shortcut/How to create .URL file?

Internet shortcut object is used to create  pointer to the URL(web document), it is something like ini file format. Its very simple to create a .URL file. Simply create a file with extension ".url" and open it with notepad and paste the following code:-



[InternetShortcut]
URL=http://tech-blog10.blogspot.com


You must specify the full valid URL i.e. protocol://server/page.


Internet shortcut to open a regular application in your PC.
As I said earlier URL field must contain protocol in its path. If you want a internet shortcut which should  point to exe file, in this case in protocol field add "file:///" instead of "http://".
Now create a file with extension ".url" and write the file.
Example:-



[InternetShortcut]
URL=file:///c:\folder name\abc.exe
 
Indeed you can change the icon of the file, by default ".url" file posses your default browser icon, and you want your application icon, in that case add few more lines in the code. Check the example below:-



[InternetShortcut]
URL=file:///c:\folder name\abc.exe
IconIndex=0
IconFile=c:\folder name\abc.exe


Now you will get the exact icon of the application.


You may be thinking what is the use of this technique?
You can use this technique to advertise your website, whenever you upload a file upload with your website's .url file.
Or you can set the shortcut for any web document for your own ease. 

No comments:

Post a Comment