Jeffel Posted October 13, 2004 Share Posted October 13, 2004 Hi all ! I have a litlle problem with my script. I would like to run an exe named : F4-BMS Config Editor.exe in a directory, but in the same directory a have another exe named F4-BMS.exe. When i ask to run "F4-BMS Config Editor.exe" autoIt run the " F4-BMS.exe"... How can i solve the problem ? Thanx for your reply! (Sorry for my English , i'am french ) Link to comment Share on other sites More sharing options...
sugi Posted October 13, 2004 Share Posted October 13, 2004 Same way you'd do it from the command line: Run('"F4-BMS Config Editor.exe"') Link to comment Share on other sites More sharing options...
Jeffel Posted October 13, 2004 Author Share Posted October 13, 2004 Thanx mate i'll test this ! Link to comment Share on other sites More sharing options...
midiaxe Posted October 13, 2004 Share Posted October 13, 2004 Also, make sure that you fully qualify the path where your exe is located. Something like: Run( "C:\Program Files\Appname\F4-BMS Config Editor.exe" ) Where: "C:\Program Files\Appname" is the directory where your exe is located. =MX= Link to comment Share on other sites More sharing options...
Jeffel Posted October 13, 2004 Author Share Posted October 13, 2004 (edited) Not running ! My script is : $reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir") run($reg &"\" &"F4-BMS Config Editor.exe") In fact instead of running run($reg &"\" &"F4-BMS Config Editor.exe") autoIt run this : run($reg &"\" &"F4-BMS.exe") Why ? How can i make autoIT run the good exe ? Edited October 13, 2004 by Jeffel Link to comment Share on other sites More sharing options...
JSThePatriot Posted October 13, 2004 Share Posted October 13, 2004 Should be something along the following lines... $reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir") $exe="F4-BMS Config Editor.exe" Run('"' & $reg & '\' & $exe & '"') Let me know if that works for you, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Jeffel Posted October 13, 2004 Author Share Posted October 13, 2004 Should be something along the following lines...$reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir") $exe="F4-BMS Config Editor.exe" Run('"' & $reg & '\' & $exe & '"')Let me know if that works for you,JS<{POST_SNAPBACK}>Very Good JSThePatriot, yes that's works for me !By the way i don't know how to build such a syntax, i haven't seen this in the help file !Thanx a lot ! Link to comment Share on other sites More sharing options...
JSThePatriot Posted October 13, 2004 Share Posted October 13, 2004 Everyone suggested to me to look at FAQ 9 it really didnt help but if you check out the follow thread that I just posted and learned this from you may be able to figure it out like I did.http://www.autoitscript.com/forum/index.php?showtopic=5419Hope it helps,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Jeffel Posted October 13, 2004 Author Share Posted October 13, 2004 This one is matching too : $reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir") run('"'&$reg &"\" &"F4-BMS Config Editor.exe" &'"') or without the last &'"' $reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir") run('"'&$reg &"\" &"F4-BMS Config Editor.exe") Really i can't understand why the '"' is necessary in the syntax, if somebody can explain it to me, i'll be happy... Is it necessary to put the &'"' at the end , it is working without it ?... Thanx for your reply ! Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 13, 2004 Share Posted October 13, 2004 This one is matching too :$reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir")run('"'&$reg &"\" &"F4-BMS Config Editor.exe" &'"')or without the last &'"'$reg=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Falcon\4.0" , "baseDir")run('"'&$reg &"\" &"F4-BMS Config Editor.exe")Really i can't understand why the '"' is necessary in the syntax, if somebody can explain it to me, i'll be happy...Is it necessary to put the &'"' at the end , it is working without it ?...Thanx for your reply !<{POST_SNAPBACK}>The characters you are refering to are ' " ' which means that you want to close the string you are currently building. Normally run line applications will assume that you want a " there is you dont close it yourself so I dont think it is required but it is suggested as if anyone else ever reads your code they will be lost trying to find where your string ends. *** Matt @ MPCS Link to comment Share on other sites More sharing options...
Jeffel Posted October 13, 2004 Author Share Posted October 13, 2004 ok Matt ! Thanx ! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now