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

A batch file to generate a shortcut

Reply to Message Icon

Original Message
Name: Death_Knight
Date: October 24, 2006 at 07:04:24 Pacific
Subject: A batch file to generate a shortcut
OS: Win2000
CPU/Ram: P4
Model/Manufacturer: 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


Report Offensive Message For Removal


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

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


Report Offensive Follow Up For Removal

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

@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



Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: A batch file to generate a shortcut

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge