Jump to content

[RESOLVED]How do I "Run" a shortcut?


Recommended Posts

I have a shortcut that I have to "execute"... can't just go run the .exe file... need to use this silly shortcut

But the following:

Run("C:\Documents and Settings\pbm0869\Start Menu\Programs\Humana\RateCalculator8", "")

produces: Unable to execute the external program.

Any suggestions?

Edited by everseeker

Everseeker

Link to comment
Share on other sites

Does Shellexecute work?

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

You could also try "Start.exe"

edit: A workaround maybe required. Start doesn't work right on links if it's not running from the same dir.

My workaround is cd to the dir first then use start to run the link.

Still trying to code it in auto it.

See post below.

Edited by spudw2k
Link to comment
Share on other sites

Run("C:\Documents and Settings\pbm0869\Start Menu\Programs\Humana\RateCalculator8.lnk", "") <--you forgot the .lnk

sorry spud i can see you included it within your code, just thought i would highlight this..

Edited by jben
Link to comment
Share on other sites

This do?

Run(@comspec & " /c cd " & chr(34) & "C:\Documents and Settings\pbm0869\Start Menu\Programs\Humana\" & chr(34) & " && start " & "RateCalculator8.lnk")
Edited by spudw2k
Link to comment
Share on other sites

hmmm.... I shall investigate...

nope...

A little more info...

this is a "Clickonce" installation... the file in question carries an extension of .appref-ms

pop that into Google to see what my problem is....

So far, I have tried:

; Launch Rate Calc
 ;Run("C:\Documents and Settings\pbm0869\Start Menu\Programs\Humana\RateCalculator8", "")
 ;Run("C:\Documents and Settings\pbm0869\Start Menu\Programs\Humana\RateCalculator8.appref-ms", "")
 ;Run(FileOpenDialog("Launch Rate Calculator", "C:\Documents and Settings\pbm0869\Start Menu\Programs\", "All(*.*)", 1, "RateCalculator8*"))
 ;ShellExecute("RateCalculator8", "", "C:\Documents and Settings\pbm0869\Start Menu\Programs\", "[email=""]", "@SW_MAXIMIZE[/email]")
 ShellExecute("RateCalculator8.appref-ms", "", "C:\Documents and Settings\pbm0869\Start Menu\Programs\", "[email=""]", "@SW_MAXIMIZE[/email]")

No joy for any of the above....

Edit - Trying Spud with .appref-ms mod

Edited by everseeker

Everseeker

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...