Link to home
Start Free TrialLog in
Avatar of hallpett
hallpett

asked on

Ms-Dos command to copy shortcut file to desktop

I'm trying to create a bat file to copy a file from the directory where the bat file is placed to the desktop.
I think something like this: copy MyApp.lnk c:\users\allusers\desktop, but I'm not sure if there is anything like allusers in windows8. Maybe there is some command that represent the current username, like %username%? Appreciate any suggestions.
ASKER CERTIFIED SOLUTION
Avatar of kola12
kola12

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Qlemo
If you issue just a plain  set  , you can see which variables are available. E.g. %AllUsersProfile%.
For getting the file in the batch file path, %~dp0MyApp.lnk can be used.
Avatar of hallpett
hallpett

ASKER

Thanks! I don't need to do it that advanced, but this gave me the solutions anyway.