Jump to content

Run(@scriptdir & "\folder2\executable.exe")


Recommended Posts

I want to run exe that is one folder in, relative to the script.

if i do messagebox of '@scriptdir & "\folder2\executable.exe")', the path to the file is correct. but if I try to run it, I get not found.

$runfile = @scriptdir & "\bin\"
MsgBox(0, "Blah", $runfile)
run("executable.exe", $runfile)

doesnt work

$runfile = @scriptdir & "\bin\executable.exe"
MsgBox(0, "Blah", $runfile)
run($runfile)

doesnt work

$runfile = @scriptdir & "\bin\executable.exe"
MsgBox(0, "Blah", $runfile)
run("\bin\executable.exe")

doesnt work

what is wrong here??

Edited by scythetleppo
Link to comment
Share on other sites

I just tried:

$runfile = @scriptdir & "\bin\runme.exe"
MsgBox(0, "First", $runfile)
Run($runfile)

with runme.exe being a compiled exe of this command (located in the propper subfolder

MsgBox(0,"runme.exe","I ran")

worked like advertised for me.

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Link to comment
Share on other sites

You see, if everyone were to keep hold of their Win 9x SendTo PowerToys, this sort of thing just wouldn't happen.

Those PowerToys are still working great in XP, by the way, though I personally prefer to keep the shortcuts on the desktop. "Send to clipboard as name" is the one you want.

You drag, then paste.

Only n00bs type paths.

-mu

essential_powertoys.zip

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