cxcio Posted June 2, 2004 Share Posted June 2, 2004 (edited) Run ( "program.msi" ) not working !!! Edited June 2, 2004 by cxcio Link to comment Share on other sites More sharing options...
midiaxe Posted June 2, 2004 Share Posted June 2, 2004 Try this: Run( @SystemDir & "\msiexec.exe /I program.msi" ) =MX Link to comment Share on other sites More sharing options...
CyberSlug Posted June 2, 2004 Share Posted June 2, 2004 See also FAQ #6 in the help file. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Guest JohnHood Posted June 2, 2004 Share Posted June 2, 2004 I'm trying to get the autoit variable $var to replace the info in quotes. Run( @SystemDir & "\msiexec.exe /I program.msi" ) I need to be able to run three programs in series. Not always the same program, hence the INI. I tried: EnvSet("ENVAR", $var) Run(@COMSPEC " /c Start %ENVAR%") Basically, I can't figure out how to get @comspec to read an AutoIt variable. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2004 Developers Share Posted June 2, 2004 (edited) I'm trying to get the autoit variable $var to replace the info in quotes. Run( @SystemDir & "\msiexec.exe /I program.msi" ) I need to be able to run three programs in series. Not always the same program, hence the INI. I tried: EnvSet("ENVAR", $var) Run(@COMSPEC " /c Start %ENVAR%") Basically, I can't figure out how to get @comspec to read an AutoIt variable.; EnvSet("ENVAR", $var) don't think you need this.. Run(@COMSPEC " /c Start " & ENVAR) Edited June 2, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
midiaxe Posted June 2, 2004 Share Posted June 2, 2004 To read a Key/Value in an INI file, you can use the "IniRead()" function (check the doc). Here's a code snippet: $var = IniRead("C:\myfile.ini", "section2", "key") ; Use "&" to concatenate strings Run(@ComSpec & " /c Start " & $var) Hope this helps! =MX= Link to comment Share on other sites More sharing options...
Guest johnhood Posted June 2, 2004 Share Posted June 2, 2004 Worked perfectly! thank you! Link to comment Share on other sites More sharing options...
Guest johnhood Posted June 2, 2004 Share Posted June 2, 2004 OK one more and I'll stop bugging you: Command line is {the name of the script,} {the name of the ini file to read}. $ini = $CmdLine[1] It gets this, I can Echo the $ini variable correctly But: $var = IniRead("& $ini &", "launch", "1", "NotFound") Always comes back "not found" tried this: $var = IniRead(" & $ini & ", "launch", "1", "NotFound") and this: $var = IniRead($ini, "launch", "1", "NotFound") and this: $var = IniRead(" & $ini & ", "launch", "1", "NotFound") What am I doing wrong? Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2004 Developers Share Posted June 2, 2004 (edited) This is the correct version.... $var = IniRead($ini, "launch", "1", "NotFound") are you sure that the INI is in the same directory as the default path or are you supplying the whole path to the ini file ?? Edited June 2, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Guest Johnhood Posted June 2, 2004 Share Posted June 2, 2004 I didn't that was why it wasn't going. Thanks again 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