Jump to content

Hide installation process


Recommended Posts

Hello All,

Perhaps this has been covered somewhere else in the forum but i have not found it :)

What i;m looking for is to hide all the steps that are performed on screen when my script executes.

It installs the IBM Client Express tool on a windows box.

The install works great but i want to hide the install process because when people do something else on their desktop it will stop/interfere the install process.

Any ideas?

Run ("Setup.exe")
WinWait("Welcome", "Setup")
Send("n")
WinWait("iSeries Access for Windows License Information","Please read the following Lice")
ControlClick("iSeries Access for Windows License Information","Please read the following Lice","Button2")
WinWait("Type of Installation","@12001;1;255,0,255")
;AutoIt supports no Owner drawn Buttons (or CheckBoxes, RadioButtons and Groupboxes: only ControlClick is possible...
ControlClick("Type of Installation","@12001;1;255,0,255","Button6")
WinWait("Select Destination Directory","Setup will install iSeries Acc")
ControlClick("Select Destination Directory","Setup will install iSeries Acc","Button1")
WinWait("Specify Programs Menu Shortcut","A shortcut will be added to th")
ControlClick("Specify Programs Menu Shortcut","A shortcut will be added to th","Button2")
WinWait("Start Copying Files","Current Settings:")
ControlClick("Start Copying Files","Current Settings:","Button1")
WinWait("Install Completed","Congratulations!  You have suc")
ControlCommand("Install Completed","Congratulations!  You have suc","Button1","UnCheck","")
ControlCommand("Install Completed","Congratulations!  You have suc","Button3","UnCheck","")
ControlClick("Install Completed","Congratulations!  You have suc","Button6")
WinWait("Setup Completed","iSeries Access for Windows Set")
ControlClick("Setup Completed","iSeries Access for Windows Set","Button3")
ControlClick("Setup Completed","iSeries Access for Windows Set","Button5")

Thank you already for the help

Edited by Martijn12
Link to comment
Share on other sites

Things to try:

  • check to see if the install for the software has command line support.
  • Use blockinput to keep the uses from messing with the install.
  • Splashscreen on top of the install process
  • hide the install windows - WinSetState, then use controlsend to send what you need to it. -
  • Make a install package using Wise
Link to comment
Share on other sites

Hi Martijn12,

Looks like your using most of the good functions so you do have good options to use. Do replace the Send with ControlSend indeed if possible.

Here is a example showing 3 options to hide the windows.

Opt('TrayIconDebug', 1)

; Check if "Installer Language" window appears.
AdlibEnable('function')

; Run the installer.
$ProcessID = Run('"' & @ScriptDir & '\CCleaner 1.41.exe"')

If WinWait('CCleaner v1.41 Setup', 'Welcome to the CCleaner', 60) Then

    ; Option 1. Move window off the screen
    ;WinMove('CCleaner v1.41 Setup', 'Welcome to the CCleaner', Default, @DesktopWidth)

    ; Option 2. Set window transparent.
    ;WinSetTrans('CCleaner v1.41 Setup', 'Welcome to the CCleaner', 25)

    ; Option 3. Set window minimized.
    ;WinSetState('CCleaner v1.41 Setup', 'Welcome to the CCleaner', @SW_MINIMIZE)

    ; Click the Next button
    ControlClick('CCleaner v1.41 Setup', 'Welcome to the CCleaner', 'Button2'); Next

    ; Disable "Installer Language" window checking
    AdlibDisable()

    WinWait('CCleaner v1.41 Setup', 'Licence Agreement')
    ControlClick('CCleaner v1.41 Setup', 'Licence Agreement', 'Button2'); I Agree

    WinWait('CCleaner v1.41 Setup', 'Choose Install Location')
    ControlClick('CCleaner v1.41 Setup', 'Choose Install Location', 'Button2'); Next

    WinWait('CCleaner v1.41 Setup', 'Install Options')
    ControlClick('CCleaner v1.41 Setup', 'Install Options', 'Button2'); Install

    WinWait('CCleaner v1.41 Setup', 'Completing the CCleaner')
    ControlClick('CCleaner v1.41 Setup', 'Completing the CCleaner', 'Button2'); Finish
EndIf
ProcessWaitClose($ProcessID)

Exit

Func OnAutoItStart()
    ; A 2nd script instance will exit.
    If WinExists(@ScriptName & '_Interpreter') Then Exit
    AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc

Func function()
    ; Check for a window that may appear.
    If WinExists('Installer Language', 'Please select a language') Then
        ControlClick('Installer Language', 'Please select a language', 'Button1'); OK
    EndIf
EndFunc

I know CCleaner has silent switches but it is an easy program to demonstrate with. :P

:)

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