Sign in to follow this  
Followers 0
scythetleppo

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

9 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

try run($runfile)

or

run("executable.exe", @scriptdir & "\bin")

Edited by Rick

Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites

try run($runfile)

yeah that's what i maent

run($runfile) donno why i put the " 's but it doesnt work =/

Share this post


Link to post
Share on other sites

run("executable.exe", @scriptdir & "\bin")


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

run("executable.exe", @scriptdir & "\bin")

ugh god i spelled the damn file wrong every time, just kill me now please it works...

ty guys for helping me and for not lynching me

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$e = Run(@scriptdir & "\bin\runme.exe",@scriptdir & "\bin\")

MsgBox(0, "First", $e)

€dit: didnt read post above^^

Edited by Busti

My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity

Share this post


Link to post
Share on other sites

ok boys.... linch him :)


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
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

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  
Followers 0