Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create shortcut in desktop using DOS

Status
Not open for further replies.

NuniPR

Programmer
Mar 3, 2005
55
PR
Hi Guys!

I have a cmd that is installing some files and registering dlls in a machine. I need to create a shortcut for an .exe file that resides in the installation folder and places it on the desktop. Is there a DOS command that I can use for this?

As usual, thanks a bunch!!



Nunina [gorgeous]
Cognos BI Administrator
San Juan, PR
 
I don't think there is a DOS command that will created .LNK files (then again haven't googled it). Instead why don't you create a batch file for the exe and have the batch file copy itself to c:\windows\documents and settings\%username%\desktop.
 
Hi itsp!

Well, the thing is that the batch file is already created, and it runs perfectly. It copies a bunch of files into a specific folder, and installs an application. Within all the files copied, one of them is an .exe. I would like to create a shortcut on the desktop for THAT .exe.

Any idea how?

Thanks,

Nunina [gorgeous]
Cognos BI Administrator
San Juan, PR
 
Use vbscript to create the icon. My login script FAQ has sample code. faq329-5798

An alternative is to have your bat file copy a shortcut from a network share to the desktop but this will be messy. It is easy and elegant using vbscript.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top