Jump to content

Can i use autoit ...


Recommended Posts

Can i use autoit script installer as hotfix using nlite. I will convert my installation pack into cab using "nlite addon maker".

Will it work?

And also i want to perform my autoit script run minimized. (Or do not want to show performing task)

Link to comment
Share on other sites


AFAIK, yes. That is launching an AutoIt script from a extracted cab file will work fine.

Some installers allow you to minimize the 1st window and the following windows will also be minimized. You also maybe able to move the 1st window off screen and automate from there. WinSetTrans() can also be used to make the windows transparent if you like. Using WinWait() and Control*() functions allow for very relible installs and windows do not need to be active so you can even use a full screen picture set Always on top will installations happen so it is all hidden.

:)

Link to comment
Share on other sites

thank you for ur reply MHz

i will be so thankful if you send post of autoit code for minimized setup or transparent. I m not so familiar with autoit script it's too vast for me to understand that advance code.

It will be easy for me if you send an example of that code.

Please..

Link to comment
Share on other sites

thank you for ur reply MHz

i will be so thankful if you send post of autoit code for minimized setup or transparent. I m not so familiar with autoit script it's too vast for me to understand that advance code.

It will be easy for me if you send an example of that code.

Please..

Example with 3 options ready for use. Uncomment only 1 option at a time to see the example.

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

Based on the lite version of CCleaner.

:)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...