Jump to content

How to run shortcuts (.lnk files)?


Recommended Posts

  • 3 years later...

I found this topic useful.  I tried it on Windows 8.1; and I had problems with the "run" command as well; I looked around, and found a reference to the modern "start" command and its use on other platforms for windows scripting--such as Citrix--where User(s) discuss(es) scripting and the command line for another application.  That page proposes using a .vbs file with the following:

"

'[This is a comment line and gives a suggested filename of MyApp.vbs] (Citrix, 2012, n.p.)
On Error Resume Next
Dim sAppPath
Set WshShell = WScript.CreateObject("WScript.Shell")
' Path to the shortcut
sAppPath = "%comspec% /c c:UsersaUserDesktopaShortcut.lnk"
' Executes the program then closes the script.
Return = WshShell.Run(sAppPath, 1, false)
Wscript.quit

[End Quote]" (Citrix, 2012, n.p.).

I also tried their command line example of:

"[This quote added for reference purposes] C:\Windows\System32\wscript.exe [then the file path in quotes (without any brackets), such as "c:UsersaUserDesktopMyApp.vbs"]" (Citrix, 2012, n.p.).  You would end up with:

c:windowssystem32wscript.exe "c:UsersaUserDesktopMyApp.vbs"

Reference:

Citrix. (2012). "How to Publish an Application Using a Shortcut (.lnk file)." Retrieved 18 Aug, 2013, from http://support.citrix.com/article/CTX966450

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...