Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

How can I create a shortcut to the file D:\myfile.extension on the Desktop using a batch script?

share|improve this question

marked as duplicate by Karan, Brad Patton, Canadian Luke, Everett, 8088 Apr 7 '13 at 2:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 12 down vote accepted

You can achieve without external tools this by creating a temporary VBScript:

@echo off


echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "%USERPROFILE%\Desktop\myshortcut.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "D:\myfile.extension" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%

cscript /nologo %SCRIPT%
del %SCRIPT%

(Idea taken from here.)

This will create myshortcut.lnk on the Desktop, pointing to D:\myfile.extension.

You can supply additional properties before saving the link by modifying the following values:


Consult How to create a desktop shortcut with the Windows Script Host to see a few examples.

share|improve this answer
@echo off
echo [InternetShortcut] >> "%AllUsersProfile%\desktop\NOTEPAD.url"
echo URL="C:\WINDOWS\NOTEPAD.EXE" >> "%AllUsersProfile%\desktop\NOTEPAD.url"
echo IconFile=C:\WINDOWS\system32\SHELL32.dll >> "%AllUsersProfile%\desktop\NOTEPAD.url"
echo IconIndex=20 >> "%AllUsersProfile%\desktop\NOTEPAD.url"

This code creates a shortcut in the "All Users" desktop folder called NOTEPAD.url pointing to the NotePad application, and will also assign an icon from the SHELL32.dll. Change the path and filename to your D:/ location and exename. And make sure your .url filename stays the same across all lines of code.

share|improve this answer
Nice idea. As long as you don't have to supply any arguments, this works well. – Dennis Jul 30 '12 at 16:16
who down voted my answer? It does exactly what the poster wanted... – Logman Jul 23 '14 at 21:43
Somebody downvoted the question and all the answers (link). – Dennis Jul 23 '14 at 22:05

there is external command shortcut.exe that can do this in that way:

shortcut /a:c /f:"c:\users\me\desktop\myshortcut.lnk" /t:"c:\program files\skype\skype.exe"

that can create shortcut of skype in your desktop

it is free downloadable program, but i can't find its link, so i will try to upload it and post the link

here it is:

shortcut.exe by Marty List

share|improve this answer
no, i didn't know that there is utility for it in resource kit by microsoft. i am currenlty using its alternative by optimum x – adventurer Jul 30 '12 at 14:58

Not the answer you're looking for? Browse other questions tagged .