Jump to content

silent install of software


Recommended Posts

I am trying to install software but it does not run when using autoit. I can run it manually and it starts right up but has a finish button. I am trying to get the finish button to be clicked.

 

Here is my code

 

AutoItSetOption("WinTitleMatchMode", 2)

$InstallPath = @ScriptDir & "\setup.exe"


If FileExists($InstallPath) Then
  Run($InstallPath)



ControlClick("ADM 3.51 Service Pack - InstallShield Wizard", "", 1)
EndIf

I am not sure what i am doing wrong. The software will not even install. If i use shellexecute it will run but not click the finish button. I can not wrap my head around this.

 

Here are the install files

 

if you have to uninstall the software use the file ADMuninstall. It is in the folder.

 

www.wpcreations.net\ServicePack.zip

Link to comment
Share on other sites

  • Moderators

@mmoore5553 welcome to the forum. In your script, you have no wait period, so the script is doing a ControlClick as soon as you run the executable. Look at WinWait in the help file, you need to wait until the window with the Finish button is active before doing the ControlClick.

Or, much better, since this is an InstallShield package just use the silent parameters and skip the GUI altogether :)

"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

jlogin. Thank you. They took all the silent switches out. I could not find any using the normal method to extract the msi. Unless you can find a way. I have included the files in the above link. I will look for the wait period.

 

What is funny it will not run at all with the run command. But if i use the shellexecute it runs. Is that normal to run a program with shellexecute ?

 

Here is current code. I am running on windows 10. Not sure if that matters

 

AutoItSetOption("WinTitleMatchMode", 2)

$InstallPath = @ScriptDir & "\setup.exe"


If FileExists($InstallPath) Then
  ShellExecute($InstallPath)

WinWait("[CLASS:Static]", "The InstallShield Wizard has successfully installed ADM 3.51 Service Pack.  Click Finish to exit the wizard.", 10)

ControlClick("ADM 3.51 Service Pack - InstallShield Wizard","Finish", 1)
EndIf

 

Link to comment
Share on other sites

i finally got it to work on my machine. But it still brings up the dialog boxes and it finished but when i add it to sccm or pdq deploy it does not run silently. I believe the finish button is not getting hit

 

AutoItSetOption("WinTitleMatchMode", 2)

$InstallPath = @ScriptDir & "\setup.exe"

Run($InstallPath)

WinWait("[CLASS:Static]", "The InstallShield Wizard has successfully installed ADM 3.51 Service Pack.  Click Finish to exit the wizard.", 10)


Do
$Finish = ControlGetHandle("ADM 3.51 Service Pack - InstallShield Wizard", "Finish", 1)
Sleep(100)
Until $Finish <> ""
ControlClick("ADM 3.51 Service Pack - InstallShield Wizard", "Finish", 1)

should i be doing something different ? Files are above in the zip file

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