Jump to content

Recommended Posts

Posted (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:

CODE
Run("msiexec /qn /i program.msi EMAILADDRESS=" & GUICtrlRead($email) & "PASSWORD=" & GUICtrlRead($passwd)")

But it isn't doing what I want, any ideas?

Thank you.

Edited by saldous
Posted

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.?
Posted (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 Then

MsgBox(4096, "", "Install Cancelled")

Exit

EndIf

MsgBox(0,0, GUICtrlRead($email))

Edited by saldous
Posted

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!

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
×
×
  • Create New...