tuffgong Posted November 21, 2013 Share Posted November 21, 2013 (edited) I am still learning this stuff. I am more of a Sys Admin who was put in an "Automation Specialist" role. Thanks to this forum, I am learning fast. I created a script that does 3 things: uninstall an old version, install pre-req's for new version, install new version. It installs perfectly but the installed software does not work. I found out from the manufacturer that another step is required. Permissions for a folder created during the "install new version" step need to be adjusted. So, I created an ICACLS statement that appears to work. However, when I put it at the end of my script, it runs concurrently with the install script. Therefore, because the folder in question has not yet been created, it fails. I have a WinWaitClose statement in there but it is ignoring it. Here is what I have, the Install and Change Folder Permissions section are the problem: ; Script Start - Uninstall Run ("<servername>SoftwareECOct13EC_Uninstall.bat") WinWait ("EnvisionConnect Maintenance") WinActivate ("EnvisionConnect Maintenance") Send ("o") WinWaitClose ("C:\Windows\System32\cmd.exe") WinWaitClose ("EnvisionConnect Maintenance") ; PreReq Install RunAs ("<admin>", "<domain>", "<admin psswrd>", 0, "C:TempECPrerequisiteBundle.exe") WinWait ("EnvisionConnect Prerequisites Setup", "This will install") WinActivate ("EnvisionConnect Prerequisites Setup", "This will install") Send ("!i") WinWaitClose ("EnvisionConnect Prerequisites Setup", "Setup Progress") WinActivate ("EnvisionConnect Prerequisites Setup", "Setup Successful") Send ("!c") ; Install RunAs ("<admin>", "<domain>", "<admin psswrd>", 0, "C:TempEC Upgrade.bat") WinWaitClose ("C:\Windows\System32\cmd.exe", "/quiet") ; Change Folder Permissions RunAs ("<admin>", "<domain>", "<admin psswrd>", 0, "C:TempPermissions.bat") The EC Upgrade.bat and the Permissions.bat run at the same time! Is it ignoring the last WinWaitClose (in the install section) because that is the second "C:\Windows\System32\cmd" window and it thinks the specified window was already closed? That was my assumption when I added the "/quiet" text but - no change. Any help would be appreciated. Edited November 21, 2013 by tuffgong Link to comment Share on other sites More sharing options...
Moderators Solution JLogan3o13 Posted November 21, 2013 Moderators Solution Share Posted November 21, 2013 For the install, try removing the WinWaitClose, and change your RunAs to RunAsWait. "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...
tuffgong Posted November 21, 2013 Author Share Posted November 21, 2013 Wow, that worked perfectly! Great call. I really appreciate the help! Thanks so much. 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