Jump to content
Ketarin forum

How to create a shortcut on desktop from command-line


josh
 Share

Recommended Posts

Hi,

 

My 3rd and last tip for today is how to create a shortcut on desktop from command-line. There's also no simple way to do this with Windows DOS. I use shortcut command which is bundled with NirCmd, read more here. I find this tiny application very useful and works very well with Ketarin, many other commands and customizations are available :-)

 

shortcut [filename] [folder] [shortcut title] {arguments} {icon file} {icon resource number} {ShowCmd} {Start In Folder} {Hot Key} 
Creates a shortcut to a file. 

Examples: 
shortcut "f:\winnt\system32\calc.exe" "~$folder.desktop$" "Windows Calculator" 
shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator" 
shortcut "f:\Program Files\KaZaA\Kazaa.exe" "c:\temp\MyShortcuts" "Kazaa" 
shortcut "f:\Program Files" "c:\temp\MyShortcuts" "Program Files Folder" "" "f:\winnt\system32\shell32.dll" 45 
shortcut "f:\Program Files" "c:\temp\MyShortcuts" "Program Files Folder" "" "" "" "max" 

 

Using shortcut with Ketarin

nircmd shortcut "%ProgramFiles%\procexp.exe" "~$folder.desktop$" "{appname}" 

 

Some more kung fu :)

nircmd shortcut "{root}USB-Toolkit\{category}\{appname}\vlc\vlc.exe" "~$folder.desktop$" "{appname}" "--no-plugins-cache --config=vlcrc --language=en --qt-minimal-view --qt-advanced-pref --no-qt-updates-notif"

Edited by josh
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.