Jump to content

Trying to create a script to do an install - (Moved)


 Share

Recommended Posts

I am trying to create a script to install PotPlayer.  When I run my script the installer opens and after I count to 10 the AutoIT runtime disappears from the task manager but the screen does not change.  Here is the script:

Run("C:\Temp\PotPlayerSetup64.exe")

WinWait("[CLASS:PotPlayerSetup64.exe]","",10)
;WinActivate("Installer Language","Please Select")
;WinWait("Intaller Languaage","Please select")
Send("{ENTER}")

If I remove the comments on the lines then the runtime does not go away.  I am running this on Windows 10 v20H2.  I have tried the 32bit and 64bit runtimes, I have installed the 32bit and 64bit of AutoIT, and also the beta version of the 64bit installer.

I know that I am probably doing something stupid but I have no idea what!!!

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

1- You may want to install it silently (recommended).  Look for a /s parameter on installer.

2- If there's no silent install, use au3info.exe tool on window installer and show us result here

3- When posting code, please use this tool.

Link to comment
Share on other sites

I am using Microsoft's MDT platform to create a build for my new computer so that I can rebuild it at will.  The whole reason that I am using AutoIT to install this program is that the installation program does not have a /S option or any other option that I can use on the installer (I am not sure where ManageEngine got their info).

Here is the Au3Info info:

>>>> Window <<<<
Title:    Installer Language
Class:    #32770
Position:    1133, 621
Size:    294, 157
Style:    0x94C808CC
ExStyle:    0x00010101
Handle:    0x00000000000D073C

>>>> Control <<<<
Class:    Static
Instance:    1
ClassnameNN:    Static1
Name:    
Advanced (Class):    [CLASS:Static; INSTANCE:1]
ID:    1007
Text:    Please select a language.
Position:    68, 16
Size:    210, 44
ControlClick Coords:    36, 16
Style:    0x50020000
ExStyle:    0x00000004
Handle:    0x0000000000130682

>>>> Mouse <<<<
Position:    1240, 679
Cursor ID:    0
Color:    0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
English
OK
Cancel
Please select a language.


>>>> Hidden Text <<<<
 

Link to comment
Share on other sites

So I have modified my code to the following

; PotPlayer Installation

Run("\\mdt01\DeploymentShare\Applications\PotPlayer\PotPlayerSetup64.exe")

WinWaitActive("[CLASS:#32770]","Please select")
;Shutdown(0)
Send("{ENTER}")

The Send command is still not working.  My test machines are a physical and virtual (Hyper-V) Windows 10 v20H2.  I built a new virtual Win 10 Pro v1903 machine, did not connect it to my domain, and it still does not work.  If I remove the comment on the Shutdown command then the computer logs off right when the language select screen appears during the install.  If I hit enter on the keyboard of my computer then the installation does continue.

Link to comment
Share on other sites

It greatly help knowing what is going with a script. So add some error handling and check the returned value of the functions.  ConsoleWrite all of it.

You could also try with #RequireAdmin

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