How to Create All Users Desktop Shortcut from Command Line - Windows 7, 8 and 10
Submitted by ingram on Sun, 10/23/2016 - 9:17pm



There isn't an easy way to create a shortcut from the command line on Windows. The easiest way we've found is to use a bat script to create vbs code, and then execute the code with cscript. It's actually really simple. Just paste the code below into a bat script and execute it to create a shortcut on the All Users desktop folder:
echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs
echo sLinkFile = "C:\Users\Public\Desktop\ShortcutToSource.lnk" >> CreateShortcut.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs
echo oLink.TargetPath = "C:\sourceFolder" >> CreateShortcut.vbs
echo oLink.Save >> CreateShortcut.vbs
cscript CreateShortcut.vbs
del CreateShortcut.vbs
If this helps you out, please leave a comment below letting us know!
Bookmark/Search this post with
- Add new comment
- 2 comments
Like this article?? Check out these:
User login
Popular content
Today's:
All time:
Last viewed:
Did you find this tutorial useful?
To assist with the bills and the author's time, please consider making a donation. Any amount helps:
Top Categories
Linux
Command Line
ubuntu
windows
Terminal
Windows 7
Exchange 2010
Exchange
Open Source
hosted exchange
hacking
Bible
Christain
SSH
Multi-Tenant
HP
WINE
Server 2008 R2
Switch
Password Recovery
Active Directory
Internet Explorer
nmap
One-Liner
Lync
Citrix
Games
Citrix Receiver
DNS
OpenPanel
Server
ping
Pure-FTPd
Script
RAID
robocopy
server 2008
SonicWall
profile migration
Windows 8
VPN
VM
tweak
Unity
PsExec
ESX
Outlook
BSOD
Awk
ASCII
Control Panel
iis
Exchange 2010 SP1
iptables
IE9
Fail2ban
IE ESC
7
2012
2008
Which value(s) would you
Which value(s) would you change to alter the title of the shortcut on the desktop?
You would change the 2nd line
You would change the 2nd line. Change "ShortcutToSource.lnk" to "CustomName.lnk"
Post new comment