java - Is it possible to write a batch file to assign shortcutkey to a .jar file in Windows -


As explained in my question, yupp, I'm looking for this one yes / no answer, if possible Do I have a way to do this?

Actually, I know about the thread "", but the shortcut keys suggested by NIRCMD in thread are not working, so I am looking for an option to do this.

To clear note that I know how to manually click and set a shortcut key in Windows, but I am looking for CMD Line or .bet path :) Thanks!

The advice is :) Thanks in advance!

You can call it directly cmd.exe command (without third party tools) You can not use it, but for this you can create a small VBScript script.

Shell interoperability is in the ActiveX object and the method you require is:

  shell = new ActiveXObject ("WScript.Shell"); Link = Shell.CreateShortcut ("Shortcut file name .lnk"); Link.TargetPath = "Path to Your Program"; Link.Arguments = "Programmable Logic"; Link.Description = "Shortcut Details"; Link.hotkey = "CTRL + SHIFT + M"; Link.Save ();  

Save this code in the .vbs file and execute it once, it will create your shortcut and it will be available immediately Note that there are more properties that you can set (icon, Window style, working directory and so on), just see MSDN for the object document.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -