Jump to content
Sign in to follow this  
tweaker

Execute Program not in path

Recommended Posts

tweaker

Probably an extremely simple syntax but how do I execute a program that isn't in the system path?

Tweaker

Share this post


Link to post
Share on other sites
tweaker

Probably an extremely simple syntax but how do I execute a program that isn't in the system path?

Tweaker

Using which syntax? I've tried Run, ProcessWait and ShellExecute.

The path I'm trying to execute is C:\program files\winamp\winamp.exe

Tweaker

Edited by tweaker

Share this post


Link to post
Share on other sites
BrettF
Valuater

$Program_Location = "C:\program files\winamp\winamp.exe"

If FileExists($Program_Location) Then
    Run($Program_Location)
Else
    MsgBox(64,"Error!!", "The file does not exist" & @CRLF & $Program_Location, 5)
EndIf

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Jos

Using which syntax? I've tried Run, ProcessWait and one other.

The path I'm trying to execute is C:\program files\winamp\winamp.exe

Tweaker

RunWait("C:\program files\winamp\winamp.exe")

Show your syntax when you want assistance ...

:)


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
tweaker

Perfect, thank you. I don't know why it didn't work the first 20 times but that program_location did the trick.

Tweaker

Share this post


Link to post
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
Sign in to follow this  

×