Jump to content

Installing LogMeIn (msi) with no question


Recommended Posts

Hi

I got this script here some days ago.

Now I'm posting it with modifications and it is has a clean code.

The original one had interaction with remote client and it was possible that he choose a wrong answer that caused wrong installation.

=======================================================

#NoTrayIcon

Opt("WinTitleMatchMode", 2)

FileInstall("logmein.msi","\logmein.msi")

RunWait(@COMSPEC & " /c Start \logmein.msi")

WinWaitActive("LogMeIn","Logo")

ControlClick("LogMeIn", "",761)

WinWaitActive("LogMeIn License Agreement","")

ControlClick("LogMeIn", "",761)

WinWaitActive("LogMeIn","Software options")

ControlClick("LogMeIn", "",386)

ControlClick("LogMeIn", "",761)

WinWaitActive("LogMeIn","Computer Description")

ControlClick("LogMeIn", "",761)

; Next 3 lines inside IF ...ENDIF are executed during installation process

; if Windows' current user has null password (it knows)

; password_to_acess_PC => when Windows' current user has null password

if WinActive("LogMeIn","Computer Access Code")=1 then

WinWaitActive("LogMeIn","Computer Access Code")

Send("password_to_acess_PC{TAB}password_to_acess_PC")

ControlClick("LogMeIn", "",761)

endif

WinWaitActive("LogMeIn","Choose Product")

ControlClick("LogMeIn", "",1319)

ControlClick("LogMeIn", "",761)

WinWaitActive("LogMeIn","LogMeIn Account Details")

ControlClick("LogMeIn", "",1371)

Send("email_at_LMI{TAB}password_at_LMI")

ControlClick("LogMeIn", "",761)

WinWaitActive("LogMeIn","Setup Completed")

ControlClick("LogMeIn", "",795)

Send("{ENTER}")

FileDelete(@TempDir & '\logmein.msi')

=======================================================

Alcy2k

Link to comment
Share on other sites

With some more modifications.

#NoTrayIcon
Opt("WinTitleMatchMode", 2)
If Not FileInstall("logmein.msi", @TempDir & "\logmein.msi", 1) Then
    Exit 1
EndIf

$pid = Run(@ComSpec & " /c msiexec /i logmein.msi", @TempDir)

WinWait("LogMeIn", "Logo")
ControlClick("LogMeIn", "Logo", 761)

WinWait("LogMeIn License Agreement")
ControlClick("LogMeIn License Agreement", "", 761)

WinWait("LogMeIn", "Software options")
ControlClick("LogMeIn", "Software options", 386)
ControlClick("LogMeIn", "Software options", 761)

AdlibEnable('_Adlib')

WinWait("LogMeIn", "Computer Description")
ControlClick("LogMeIn", "Computer Description", 761)

WinWait("LogMeIn", "Choose Product")
ControlClick("LogMeIn", "Choose Product", 1319)
ControlClick("LogMeIn", "Choose Product", 761)

AdlibDisable()

WinWait("LogMeIn", "LogMeIn Account Details")
WinActivate("LogMeIn", "LogMeIn Account Details")
WinWaitActive("LogMeIn", "LogMeIn Account Details")
ControlClick("LogMeIn", "LogMeIn Account Details", 1371)
Send("email_at_LMI{TAB}password_at_LMI")
ControlClick("LogMeIn", "LogMeIn Account Details", 761)

WinWait("LogMeIn", "Setup Completed")
WinActivate("LogMeIn", "Setup Completed")
WinWaitActive("LogMeIn", "Setup Completed")
ControlClick("LogMeIn", "Setup Completed", 795)
Send("{ENTER}")

ProcessWaitClose($pid)

FileDelete(@TempDir & '\logmein.msi')

Exit

Func _Adlib()
    ; Next 3 lines inside IF ...ENDIF are executed during installation process
    ; if Windows' current user has null password (it knows)
    ; password_to_acess_PC => when Windows' current user has null password
    If WinExists("LogMeIn", "Computer Access Code") Then
        WinWait("LogMeIn", "Computer Access Code")
        WinActivate("LogMeIn", "Computer Access Code")
        WinWaitActive("LogMeIn", "Computer Access Code")
        Send("password_to_acess_PC{TAB}password_to_acess_PC")
        ControlClick("LogMeIn", "Computer Access Code", 761)
    EndIf
EndFunc

See how that works.

:)

Edit:

1. Added text parameters in the Adlib scanning area of the script.

2. Fixed other text parameters. May as well do it right.

Edited by MHz
Link to comment
Share on other sites

Hi

I made another modifiction by security reasons.

PS: I'm brazilian then I'm sorry for my english that isn't good enough and I'm new with Autoit too.

================================================================================

#NoTrayIcon

$Prompt=MsgBox(36," WARNING ","Installing this program, your computer can be remotelly controlled by 'person_name' with your agreement. Do you want to continue?")

If $Prompt = 7 then ; Don't want to install

Exit 1

Endif

Opt("WinTitleMatchMode", 2)

:

:

:

Alcy2k

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