Computing.Net > Forums > Programming > A batch file to generate a shortcut

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

A batch file to generate a shortcut

Reply to Message Icon

Name: Death_Knight
Date: October 24, 2006 at 07:04:24 Pacific
OS: Win2000
CPU/Ram: P4
Product: IBM
Comment:

Hi, I wanna create a batch file that when I run the file it will generate a shortcut for an URL that I want on the desktop. Does anyone knows how to do it, I did a google search but not much luck



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: October 24, 2006 at 08:40:26 Pacific
Reply:

Copy a shortcut to your desktop and open it in notepad. You will then see what it contains. you only need the [DEFAULT] and [InternetShortcut] values.

Then just create a text document witht he values you want and save it with a ".url" extention.

Michael J


0

Response Number 2
Name: Mechanix2Go
Date: October 24, 2006 at 11:54:37 Pacific
Reply:

@echo off
if %1'==' echo you need a URL && goto :eof

pushd "C:\Documents and Settings\Administrator\Desktop"
> my.URL echo [InternetShortcut]
>> my.URL echo URL=http://www.%1
popd



=====================================
If at first you don't succeed, you're about average.

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: A batch file to generate a shortcut

Batch File to Create a Shortcut www.computing.net/answers/programming/batch-file-to-create-a-shortcut/13374.html

Batch file to insert string www.computing.net/answers/programming/batch-file-to-insert-string-/19385.html

batch file to copy & increment www.computing.net/answers/programming/batch-file-to-copy-increment/18184.html