Jump to content

Automate EXE installation with wait option


amaged
 Share

Recommended Posts

Check which function didn't work:

Run("C:\Client\Setup - ReInstallMIMSys.exe")
$hWindow = WinWait("MIMSys Install")
$iReturnValue = ControlClick($hWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]")
$hWindow = WinWait ("MIMSYS HIS ERP SETUP - InstallShield Wizard")
MsgBox(0, "", "Winwait returned: " & $hWindow)
$iReturnValue = ControlClick($hWindow, "" , "[CLASS:Button; INSTANCE:1]")
MsgBox(0, "", "ControlClick returned: " & $iReturnValue)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

1 hour ago, water said:

Check which function didn't work:

Run("C:\Client\Setup - ReInstallMIMSys.exe")
$hWindow = WinWait("MIMSys Install")
$iReturnValue = ControlClick($hWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]")
$hWindow = WinWait ("MIMSYS HIS ERP SETUP - InstallShield Wizard")
MsgBox(0, "", "Winwait returned: " & $hWindow)
$iReturnValue = ControlClick($hWindow, "" , "[CLASS:Button; INSTANCE:1]")
MsgBox(0, "", "ControlClick returned: " & $iReturnValue)

 

 

returned the below value

Capture.JPG

then

Capture2.JPG

Edited by amaged
Link to comment
Share on other sites

Maybe if we specify the ControlId to use:

Run("C:\Client\Setup - ReInstallMIMSys.exe")
$hWindow = WinWait("MIMSys Install")
$iReturnValue = ControlClick($hWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]")
$hWindow = WinWait ("MIMSYS HIS ERP SETUP - InstallShield Wizard")
MsgBox(0, "", "Winwait returned: " & $hWindow)
$iReturnValue = ControlClick($hWindow, "" , 1)
MsgBox(0, "", "ControlClick returned: " & $iReturnValue)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

As "Next" is already pre-selected we could simply send the needed key to the Window. As Send always interacts with the active window we need to make sure that the user can't interfere with our script. So we block user input while the script is running :)

#include <AutoItConstants.au3>
BlockInput($BI_DISABLE) ; Disable User Input
Run("C:\Client\Setup - ReInstallMIMSys.exe")
$hWindow = WinWait("MIMSys Install")
$iReturnValue = ControlClick($hWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]")
$hWindow = WinWait ("MIMSYS HIS ERP SETUP - InstallShield Wizard")
MsgBox(0, "", "Winwait returned: " & $hWindow)
Send("!+n") ; Alt Shift n
BlockInput($BI_ENABLE) ; Enable User Input

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Ok. Then please try the following Send statements (one after the other) until one of them works:

Send("!n") ; Alt n
Send("{ENTER}") ; Enter
Send("{SPACE}") ; Space

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

still same issue. I appreciate your help guys. we kept delaying our deployment and today after a couple of hours we will start the process manually . I have uploaded the installation client here   https://drive.google.com/file/d/19SYR_n8OjjSvNyLlYSXFzFhsNqcHYJOW/view?usp=sharing         as a final resort in case you need to have a closer /faster interaction . I really appreciate your help, time and patience so far regardless of any outcomes

Regards

 

Ahmed

Link to comment
Share on other sites

When you manually try the above keys, which one works?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

nothing like waiting until the last minute, and rar, seriously?

the way to have gone about this is to look in the registry for the installed applications. this thing wants to uninstall several apps then do a clean install. The installer utility front end is authored in WinForms, apparently, so forget conventional AutoIT methods there. had you shared this first off you would not have wasted so much time.

nobody can really test that installer utility because they don't have all that mimsys stuff installed. no way to help out. 

there are many ways to skin a cat, you can't always brute force your choice into being the right course of action. the registry contains installer info and if push came to shove you could delete their reg keys and files, then reinstall clean.

 

if you need help with the InstallShield part, I can help with that. that first bit, in the first directory was probably whipped up in C# using WinForms it looks like. The actual install can be automated, uninstall AND install. I've done it many times and know how InstallScript crap installers work.

my installscript installers support a /silent option I programmed and I don't even need the stupid response .iss file, except that you need a dummy at least or InstallShield will barf because it is missing. my installers are not stupid.

 

See FAQ 31 for ways to deal with WinFoms and WPF apps.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

and you can tell them that both are the shittiest installers i have ever seen! can't even install the second one, says 205 GB isn't enough space! LOL. FAIL. good luck. I take back what I said. Those retarded installers probably cannot be silently installed. 

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • Developers
28 minutes ago, Earthshine said:

and you can tell them that both are the shittiest installers i have ever seen! can't even install the second one, says 205 GB isn't enough space! LOL. FAIL. good luck. I take back what I said. Those retarded installers probably cannot be silently installed. 

chill-pill time it is master Eathshine 

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...