Jump to content

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


Recommended Posts

Posted (edited)

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
Posted

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

 

Posted

@Water .... It's similar to any installer like your games installation or a photoshop installation ... Basically a setup.exe .... Could you please share a sample silent installer please?

Posted

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

 

  • Moderators
Posted

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!

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