Create shortcut batch file windows xp




















Viewed 29k times. Example: 1 Create an empty file vbs. CreateObject "WScript. Save 2 Double click the the vbs. I want to make it work. Add a comment. Active Oldest Votes. Community Bot 1 1 1 silver badge. Is there a solution available for creating shortcuts on Windows 7? I didn't giv a try to it but instead found a solution at link will check it as well if this doesn't work. Thanks — Sandeep Yohans. Echo "usage: makeshortcut. ExpandEnvironmentStrings WScript. Item 4 objSC.

Save WScript. Learn more. Create a Windows shortcut through a batch file. Asked 11 years, 5 months ago. Active 10 years, 8 months ago. Viewed 22k times. Is it possible to create a shortcut from a. Improve this question.

Luca Matteis Luca Matteis 3 3 gold badges 11 11 silver badges 21 21 bronze badges. Add a comment. Active Oldest Votes. CreateObject "WScript. CreateShortcut sLinkFile oLink. EXE" ' optional shortcut properties ' oLink. EXE, 2" ' oLink. Save Source. Improve this answer. Garrett R. Hylltun Garrett R. Be advised that this will only work if the. Also, apparently admin rights are required to create symbolic links. Cannot be done with pure batch. Check the shortcutJS.

With -help you can check the other options you can set icon , admin permissions and etc. Rohit Sahu's answer worked best for me in Windows The PowerShell solution ran, but no shortcut appeared. The JScript solution gave me syntax errors. I didn't try mklink, since I didn't want to mess with permissions. I wanted the shortcut to appear on the desktop. But I also needed to set the icon, the description, and the working directory. Note that MyApp Here's my mod of Rohit's solution:. Nirsoft's NirCMD can create shortcuts from a command line, too.

Along with a pile of other functions. Free and available here:. Yes, using nircmd does mean you are using another 3rd-party. Though it appears that the shortcutjs. Nircmd is probably simpler. And you can of course modifie it to your purpose. I would like to propose different solution which wasn't mentioned here which is using. URL files:. I created a VB script and run it either from command line or from a Java process.

I also tried to catch errors when creating the shortcut so I can have a better error handling. To create a shortcut for warp-cli.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How do I create a shortcut via command-line in Windows? Ask Question. Asked 6 years, 8 months ago.

Active 2 months ago.



0コメント

  • 1000 / 1000