Jump to content

AutoIT script opens the Installer application in minimized state when system is locked. Need to launch as active


MYK
 Share

Recommended Posts

I am using Autoit to install an application.

When I execute the script while system is not locked the installer application launches as maximized and but when when system is locked it get's minimized due to which the scripts don't run and wait for it to get maximised. Can some one help please? I have checked many solutions online but not very successfull. Below is my code

#include <Array.au3>
#include <WinAPIShPath.au3>

$CmdLine[1];
Run($CmdLine[1])

Sleep(2000)
WinWait("Installer Application","&Next")

ControlClick("Installer Application","&Next","[CLASS:Button; INSTANCE:2]")

Sleep(2000)
WinWait("Installer Application","Yes")

 ...... The code goes on. The issue is only at the start, After the Run() command the application is minimized and not active due to which the script pauses until I manually mmaximize it. Please help

Edited by MYK
Link to comment
Share on other sites

Welcome to AutoIt and the forum!
Can you tell us which program you try to install? Most installers provide a silent installation command line switch. So there would be no need to automate the GUI.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

It depends on the tool that is used to create the installation exe.
Most of the time I ask Google for "xxxx silent installation command line switch" where "xxxx" is the name of the product.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

  • Moderators

Could you please share a sample silent installer please?

We certainly can, if you would share the product name. As has been pointed out, every application is different.

"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

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...