saldous Posted February 19, 2007 Share Posted February 19, 2007 (edited) My script is using InputBoxes to ask the user for a number of things, email address, password etc.. I want to take these inputs and pass them to a command line install. I've got these items defined the the InputBox inputs: $email, $passwd but my pass through to the command line isn't working. My command line should look like this: msiexec /qn /i program.msi EMAILADDRESS=$email PASSWORD=$passwd I'm using the following code for it: CODERun("msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & "PASSWORD=" & GUICtrlRead($passwd)") But it isn't doing what I want, any ideas? Thank you. Edited February 19, 2007 by saldous Link to comment Share on other sites More sharing options...
Valuater Posted February 19, 2007 Share Posted February 19, 2007 maybe.. Run("msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & " PASSWORD=" & GUICtrlRead($passwd)) 8) Link to comment Share on other sites More sharing options...
nobby Posted February 19, 2007 Share Posted February 19, 2007 runwait("msiexec.exe /i PATH\program.msi /passive", @ScriptDir) This works for me. CheersNobby Link to comment Share on other sites More sharing options...
saldous Posted February 20, 2007 Author Share Posted February 20, 2007 maybe.. Run("msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & " PASSWORD=" & GUICtrlRead($passwd)) 8) Thanks, but it still isn't working right. How can I make it show me the output from the above code so I can see where the problem is? i.e where there is a space that shouldn't be there or where one is missing etc.? Link to comment Share on other sites More sharing options...
Shevilie Posted February 20, 2007 Share Posted February 20, 2007 MsgBox(0,0,"msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & " PASSWORD=" & GUICtrlRead($passwd)) Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
saldous Posted February 20, 2007 Author Share Posted February 20, 2007 (edited) MsgBox(0,0,"msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & " PASSWORD=" & GUICtrlRead($passwd))Thanks, so the problem is that both $email and $passwd are returning values of "0" and not the real contents of them.Going back to what I said earlier, I'm using InputBoxes here, rather than GUICtrlCreateEdit, does that make a difference? How do you read back in from an InputBox response?Even the following simple code returns a "0" instead of the entered data:CODE; User enters email address$email = InputBox("Install", "Please enter your email address", "", " M", _ 400, -1)If @error = 1 ThenMsgBox(4096, "", "Install Cancelled")ExitEndIfMsgBox(0,0, GUICtrlRead($email)) Edited February 20, 2007 by saldous Link to comment Share on other sites More sharing options...
Shevilie Posted February 20, 2007 Share Posted February 20, 2007 As simple as ; User enters email address $email = InputBox("Install", "Please enter your email address", "", " M", _ 400, -1) If @error = 1 Then MsgBox(4096, "", "Install Cancelled") Exit EndIf MsgBox(0,0, $email) Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
saldous Posted February 20, 2007 Author Share Posted February 20, 2007 Shevilie, you are a life saver! Thank you so much, my script is working perfectly now. So simple, I was over complicating it ! Everyone on these forums that has helped me has enabled me to complete my 1st script in just over 24 hours. AutoIT is excellent, I'm no programmer and I've managed to get something up and running in a very short time. Perfect! Link to comment Share on other sites More sharing options...
Shevilie Posted February 20, 2007 Share Posted February 20, 2007 Np Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit 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