Jump to content

Hamachi wizard setup


adi4x
 Share

Recommended Posts

I have to setup hamachi on many client computers so really could use an automation tool like this

The problem is that hamachi can loose focus so the installation fails.

WinActivate is not helping to much

Here is what i've done so far ... Any help please ?

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Run("hamachi.exe")

WinWaitActive("Hamachi Setup", "Welcome to Hamachi Setup")
WinSetOnTop ( "Hamachi Setup", "Welcome to Hamachi Setup", 1 )
WinActivate ( "Hamachi Setup")
Send("{ENTER}")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "License Agreement")
Send("!c!n")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "Options")
Send("{ENTER}")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "Security")
Send("{ENTER}")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "Commercial")
Send("!n !n")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "Hamachi is now ready to be installed")
Send("!n")
WinWaitActive("Hamachi Setup", "Click Next to proceed.")
WinActivate ( "Hamachi Setup")
Send("!n")
WinActivate ( "Hamachi Setup")
WinWaitActive("Hamachi Setup", "The Hamachi client software has been")
WinActivate ( "Hamachi Setup")
Send("!n")
Edited by adi4x
Link to comment
Share on other sites

There is a WM_SETFOCUS and WM_KILLFOCUS that can monitor what you are focusing on that way you can always keep your focus on that one application

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Link to comment
Share on other sites

Here is the extracted AutoIt program for installing Hamachi

; <AUT2EXE VERSION: 3.1.1.0>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: D:\qwer\svcpack\Hamachi.au3>
; ----------------------------------------------------------------------------

; This will install Hamachi 1.0.2.5
Run             ( "Hamachi1025.exe" )

; Welcome
WinWaitActive   ( "Hamachi Setup" , "Welcome to Hamachi Setup Wizard" )
ControlClick    ( "Hamachi Setup" , "" , "Button1" )

; License
WinWaitActive   ( "Hamachi Setup" , "License Agreement" )
Send            ( "!c" )
Send            ( "!n" )

; Destination Location
WinWaitActive   ( "Hamachi Setup" , "Folder for application files" )
Send            ( "!n" )

; Security
WinWaitActive   ( "Hamachi Setup" , "Security" )
Send            ( "!n" )

; Basic vs. Premium
WinWaitActive   ( "Hamachi Setup" , "Basic vs Premium" )
Send            ( "!n" )

; Ready to install
WinWaitActive   ( "Hamachi Setup" , "Hamachi is now ready to be installed" )
Send            ( "!n" )

; Installation completed
WinWaitActive   ( "Hamachi Setup" , "Hamachi client software has been successfully installed" )
Send            ( "!n" )

; Installation completed 2
WinWaitActive   ( "Hamachi Setup" , "Setup is now ready to exit" )
Send            ( "!l" )
Send            ( "!n" )

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: D:\qwer\svcpack\Hamachi.au3>
; ----------------------------------------------------------------------------

You should really use ControlSend to do this tho, It is better.

_________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell

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