Jimathth Posted August 27, 2012 Share Posted August 27, 2012 I tried the simple script below to automate the installation of my eFax client for my 140 users. The "RunAs" administrator works fine, but the eFax app starts and closes a "Computing space requirements" window. when the install closes that window the script stops. I'm guessing the apps opening and closing a window is interupting the script somehow. I'm a bit of a newbie on scripting, so any ideas on how I can get past this sticking point? Jim Link to comment Share on other sites More sharing options...
tes5884 Posted August 27, 2012 Share Posted August 27, 2012 You're script is not attached.If you can can find silent switches, you'll have a much easier time.. www.tspitz.com Link to comment Share on other sites More sharing options...
Jimathth Posted August 27, 2012 Author Share Posted August 27, 2012 Sorry. Forgot the script. Here it is.; Fill in the username and password appropriate for your system.Local $sUserName = "Administrator"Local $sPassword = "xxxxxxxxxx"; Run a command prompt as the other user.RunAs($sUserName, @ComputerName, $sPassword, 0, "msgrplus.exe", @SystemDir); Select Installed language default 'English' United StatesWinWaitActive("eFax Messenger Setup")Send("{ENTER}");This is the next window that needs a command sent to it.WinwaitActive("eFax Messenger Setup" & "Welcome to eFax Messenger Setup Wizard");Trying to send a click command to a button, but the next window just stops and nothing happens.ControlClick("eFax Messenger Setup" & "Welcome to eFax Messenger Setup Wizard", "next", "1497");I also tried "WinWaitActive" and anything else I could find that looked like it might work.WinWaitActive("eFax Messenger Setup" & "Choose Setup Type")Send("!t");WinWaitActive("eFax Messenger Setup" & "End-User License Agreement")Send("!a")Send("!n");WinWaitActive("eFax Messenger Setup" & "Ready to Install")Send("!i");Close the setup wizard by clicking "Finish"WinWaitActive("eFax Messenger Setup" & "COmpleting the eFax Messenger Setup Wizard")Send("!f") Link to comment Share on other sites More sharing options...
tes5884 Posted August 27, 2012 Share Posted August 27, 2012 (edited) try extracting the EXE filesmsgrplus.exe /extract:new_folderThenRun("msiexec /i eFaxMessenger4.4.msi /qb")orRunAs($sUserName, @ComputerName, $sPassword, 0, "[/font][/color]msiexec /i eFaxMessenger4.4.msi /qb[color=#282828][font=helvetica, arial, sans-serif]", @SystemDir)should work Edited August 27, 2012 by tes5884 www.tspitz.com Link to comment Share on other sites More sharing options...
Jimathth Posted August 28, 2012 Author Share Posted August 28, 2012 Do I add those line to the beginning of my script to extract the exe and make it an MSI? Or should this be done as a separate process? I apologize for my newbiness. Jimathth Link to comment Share on other sites More sharing options...
tes5884 Posted August 28, 2012 Share Posted August 28, 2012 first extract the exe file, on your desktop. among the extracted files you will find a msi package. then you run my previous runas code after your credentials code. Then you won't have to manually click through everything.. No need to apologize, I was alot noobier then you pretty recently www.tspitz.com Link to comment Share on other sites More sharing options...
Exit Posted August 28, 2012 Share Posted August 28, 2012 WinwaitActive("eFax Messenger Setup" & "Welcome to eFax Messenger Setup Wizard") There is a syntax error. It should read: WinwaitActive("eFax Messenger Setup" , "Welcome to eFax Messenger Setup Wizard") Same in controlclick. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
tes5884 Posted August 29, 2012 Share Posted August 29, 2012 This should do the job ; Fill in the username and password appropriate for your system. Local $sUserName = "Administrator" Local $sPassword = "xxxxxxxxxx" RunAs($sUserName, @ComputerName, $sPassword, 0, "msiexec /i eFaxMessenger4.4.msi /qb", @SystemDir) MsgBox(0,"", "Done!") I didn't test it, but this should be your entire script. Sorry for the belated response, I was out of my office yesterday. www.tspitz.com Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 29, 2012 Moderators Share Posted August 29, 2012 I would suggest RunAsWait if you're going to do a MsgBox. With RunAs, the Msgbox will show up right away. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
tes5884 Posted August 29, 2012 Share Posted August 29, 2012 I stand corrected. I was going to switch that before posting, and forgot. Here is the corrected version: ; Fill in the username and password appropriate for your system. Local $sUserName = "Administrator" Local $sPassword = "xxxxxxxxxx" RunAsWait($sUserName, @ComputerName, $sPassword, 0, "msiexec /i eFaxMessenger4.4.msi /qb", @SystemDir) MsgBox(0,"", "Done!") www.tspitz.com 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