I windows 7 you create the shortcut in C:\Users\All Users\desktop
Well, that folder is not accessible.
So where should I put it in windows 10?
It's the CommonDesktopDirectory special folder and most of the time it's:
C:\Users\Public\Desktop
To find out the directory for your system, run in a PowerShell prompt:
[Environment]::GetFolderPath('CommonDesktopDirectory')
In Windows 10 Login as Administrator (Local Admin).
Go to Control Panel > File Explorer Options > click on the View tab > under Advanced settings: look for hidden files and folders > choose "Show hidden files, folders, and drives" and click "OK".
Go to C drive (C:) > Users > Public > Public Desktop
The "public desktop" folder is normally a hidden folder.
Now you can put your shortcuts in: C:\Users\Public\Desktop
Put it in this folder (exactly like below, with the % characters):
%public%\Desktop
e.g. using this command:
copy file.lnk %public%\Desktop
This should be more reliable in case Users location is changed.
Bonus: other ways to open the public desktop in Explorer:
I don't know if things have changed since the previous post, but...
I just checked my Windows 10 x64 Home (which I just did a clean install a couple of hours ago) and from an elevated ("run as admin") command prompt, was able to copy a shortcut link from
"C:\Users\admin\downloads\"
to
"c:\Users\All users\desktop\"
and it did appear on my desktop! But, oddly enough, I cannot view a directory listing, or do any other type of function (like delete) in the "C:\Users\All users" directory.
Just thought I'd share that, in case there is some other reason/purpose behind it.
Another simple way instead of doing all this crazy (albeit simple) stuff with command prompt, simply drag and drop from somewhere else to the Public Desktop, and it will automagically prompt for Admin credentials. No need to launch elevated command window and use commands...
That folder is only accessible if you elevate in Windows 10 - Im' not sure how to elevate "explorer.exe", but you can copy the shortcut using pwoershell or dos "run as administrator. example:
PS:> cp 'C:\Users\conradb\Desktop\photies - Shortcut.lnk' c:\Users\Public\Desktop c:\Users\Public\Desktop
or if using a DOS administrator prompt: C:\WINDOWS\system32>copy 'C:\Users\conradb\Desktop\photies - Shortcut.lnk' c:\Users\Public\Desktop c:\Users\Public\Desktop