MSFN Forum: Help creatinv silent installer with autoit - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help creatinv silent installer with autoit Rate Topic: -----

#1 User is offline   kappakai 

  • Group: Members
  • Posts: 3
  • Joined: 14-April 08

Posted 14 April 2008 - 01:42 PM

I watched the video tutorial and have also tried following a text tutorial explaining how to use Scite and both ways I've gotten the same result on multiple programs now. First when I opened the compiled exe it would just continue to open over and over again so I then added a script to stop that, but when I open the exe the autoit icon appears in the tray and nothing happens. Here is what I've got
;Script to silently install TTPack
$SF_1 = "TTPack.exe"

If WinExists ( $SF_1 ) Then Exit
AutoItWinSetTitle ( $SF_1)

Run("TTpack.exe")

; Welcome
WinWaitActive  ("TTPack Setup" , "Welcome")
ControlClick   ("TTPack Setup" , "Button2")

; Components
WinWaitActive  ("TTPack Setup" , "Components")
Send		   ("{SPACE}") 
Send		   ("{DOWN}") 
Send		   ("{SPACE}") 
Send		   ("{DOWN}") 
Send		   ("{SPACE}") 
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{DOWN}")
Send		   ("{SPACE}")
ControlClick   ("TTPack Setup" , "Button2")

; Destination Location
WinWaitActive  ("TTPack Setup" , "Destination Location")
Send		   ( @ProgramFilesDir & "\TTPack" )  
ControlClick   ("TTPack Setup" , "Button2")

; RealLite Options
WinWaitActive  ("TTPack Setup" , "RealLite Options")
Send		  ("C:\Program Files\Media Player Classic\mplayerc.exe")
ControlClick   ("TTPack Setup" , "Button2")

; Browser Options
WinWaitActive  ("TTPack Setup" , "Browser Options")
ControlClick   ("TTPack Setup" , "Button2")

; Start Menu
WinWaitActive  ("TTPack Setup" , "Start Menu Options")
Send		   ("{TAB}") 
Send		   ("{TAB}") 
Send		   ("{SPACE}") 
ControlClick   ("TTPack Setup" , "Button2")

; Installation Complete
WinWaitActive  ("TTPack Setup" , "Installation Complete")
ControlClick   ("TTPack Setup" , "Button2")

; Completing Setup
WinWaitActive  ("TTPack Setup" , "Completing Setup")
ControlClick   ("TTPack Setup" , "Button2")


Could someone please help me? What am I doing wrong?

This post has been edited by kappakai: 14 April 2008 - 03:14 PM



#2 User is online   ajua 

  • Custom Installer Maker
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,260
  • Joined: 16-April 05

Posted 14 April 2008 - 03:19 PM

I'm no expert in AutoIt. I have made a few scripts using the scrip writer that comes with scite. The only thing i do is uncheck record mouse, check record windows title and then i run the setup file and install the program using nothing but the keyboard (i recommend using alt+letter for installers that support shortcuts).

When I'm done. I save the script but i change the path to the setup file and only leave this: setup.exe and i put the compiled script along with the file setup.exe. I install about 5 apps or so in my unattended install and i never had a problem.

Hope this helps you.

#3 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 702
  • Joined: 08-February 07

Posted 14 April 2008 - 03:25 PM

View Postkappakai, on Apr 14 2008, 10:42 PM, said:

Could someone please help me? What am I doing wrong?

Hi,
ControlClick commands should look like this: 
ControlClick("Software License Agreement", "", "Button1")


#4 User is offline   kappakai 

  • Group: Members
  • Posts: 3
  • Joined: 14-April 08

Posted 14 April 2008 - 04:17 PM

Thanks for the tips, but I still cant get it to work.

#5 User is offline   gauntlet123 

  • Newbie
  • Group: Members
  • Posts: 20
  • Joined: 04-July 07

Posted 14 April 2008 - 07:33 PM

If you remove everything after Run("TTpack.exe") what happens? (i.e. make sure the executable you're running and the script are in the same directory). All the stuff you have before this line isn't necessary either, you should focus on debugging instead of a workaround, especially since this is a pretty simple script.

Maybe double-check the window titles/text too. I don't know what version you're using, but a lot of them don't match up with the version I downloaded (2.2.0.3). The text for components/location both start with Choose, options is RealLite's (not RealLite), browers options starts with Alternative, start menu starts with Choose, etc. Use window info to double-check.

The installer I downloaded also began with a prompt for choosing the installer language. If you have installed it on your system before, there's a chance that this prompt won't come up when resintalling, so you may want to check for anything that's lingering in %AppData%.

#6 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 702
  • Joined: 08-February 07

Posted 15 April 2008 - 06:54 AM

Here you have the script for TTPack 2.2.0.3 (works in Windows XP 64bit too):
Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "TTPack 2.2.0.3.exe"
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()

If $OS = 32 Then
; Installation folder
    $INSTALLLOCATION = @ProgramFilesDir & "\TTPack"
; Real Lite options
; Media Player (Optional)
    $MediaPlayer = @ProgramFilesDir & "\Media Player Classic\mplayerc.exe"
  ; Alternative Browsers' Options
  ; Plugins' Folder
    $PluginsFolder = $INSTALLLOCATION & "\Browser\Plugins"
  ; Components' Folder
    $ComponentsFolder = $INSTALLLOCATION & "\Browser\Components"
; Start Menu folder
    $StartMenuFolder = "TTPack"
        If FileExists($INSTALLLOCATION & "\uninstall.exe") Then
        MsgBox(0x40010, @ScriptName, "Please uninstall previous version of TTPack before using this script", 4)
        Exit
    EndIf
    ; Run the installer
    Run($EXECUTABLE)

  ; Please select a language.
    WinWait("Installer Language", "Please select a language.")
    WinActivate("Installer Language", "Please select a language.")
    ControlClick("Installer Language", "", "Button1")

  ; Welcome to the TTPack Setup Wizard
    WinWait("TTPack Setup", "Welcome to the TTPack Setup Wizard")
    WinActivate("TTPack Setup", "Welcome to the TTPack Setup Wizard")
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Components
    WinWait("TTPack Setup", "Choose Components")
    WinActivate("TTPack Setup", "Choose Components")
    Send("{SPACE}") 
    Send("{DOWN}") 
    Send("{SPACE}") 
    Send("{DOWN}") 
    Send("{SPACE}") 
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{SPACE}")
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Install Location
    WinWait("TTPack Setup ", "Choose Install Location")
    WinActivate("TTPack Setup ", "Choose Install Location")
    ControlSetText("TTPack Setup ", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup ", "", "Edit1", $INSTALLLOCATION)
    ControlClick("TTPack Setup ", "", "Button2")

  ; ReaLite's Options
    WinWait("TTPack Setup", "ReaLite's Options")
    WinActivate("TTPack Setup", "ReaLite's Options")
    ControlSetText("TTPack Setup ", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup ", "", "Edit1", $MediaPlayer)
    ControlClick("TTPack Setup", "", "Button2")

  ; Alternative Browsers' Options
    WinWait("TTPack Setup", "Alternative Browsers' Options")
    WinActivate("TTPack Setup", "Alternative Browsers' Options")
    ControlSetText("TTPack Setup", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit1", $PluginsFolder)
    ControlSetText("TTPack Setup", "", "Edit2", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit2", $ComponentsFolder)
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Start Menu Folder
    WinWait("TTPack Setup ", "Choose Start Menu Folder")
    WinActivate("TTPack Setup ", "Choose Start Menu Folder")
    ControlSetText("TTPack Setup", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit1", $StartMenuFolder)
    ControlClick("TTPack Setup ", "", "Button2")

  ; Installation Complete
    WinWait("TTPack Setup ", "Installation Complete")
    WinActivate("TTPack Setup ", "Installation Complete")
    ControlClick("TTPack Setup ", "", "Button2")

  ; Completing the TTPack Setup Wizard
    WinWait("TTPack Setup ", "Completing the TTPack Setup Wizard")
    WinActivate("TTPack Setup ", "Completing the TTPack Setup Wizard")
    ControlClick("TTPack Setup ", "", "Button2")
EndIf

If $OS = 64 Then
; Installation folder
    $INSTALLLOCATION = @HomeDrive & "\Program Files (x86)\TTPack"
; Real Lite options
; Media Player (Optional)
    $MediaPlayer = @HomeDrive & "\Program Files (x86)\Media Player Classic\mplayerc.exe"
  ; Alternative Browsers' Options
  ; Plugins' Folder
    $PluginsFolder = $INSTALLLOCATION & "\Browser\Plugins"
  ; Components' Folder
    $ComponentsFolder = $INSTALLLOCATION & "\Browser\Components"
; Start Menu folder
    $StartMenuFolder = "TTPack"
        If FileExists($INSTALLLOCATION & "\uninstall.exe") Then
        MsgBox(0x40010, @ScriptName, "Please uninstall previous version of TTPack before using this script", 4)
        Exit
    EndIf
    ; Run the installer
    Run($EXECUTABLE)

  ; Please select a language.
    WinWait("Installer Language", "Please select a language.")
    WinActivate("Installer Language", "Please select a language.")
    ControlClick("Installer Language", "", "Button1")

  ; Welcome to the TTPack Setup Wizard
    WinWait("TTPack Setup", "Welcome to the TTPack Setup Wizard")
    WinActivate("TTPack Setup", "Welcome to the TTPack Setup Wizard")
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Components
    WinWait("TTPack Setup", "Choose Components")
    WinActivate("TTPack Setup", "Choose Components")
    Send("{SPACE}") 
    Send("{DOWN}") 
    Send("{SPACE}") 
    Send("{DOWN}") 
    Send("{SPACE}") 
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
    Send("{SPACE}")
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Install Location
    WinWait("TTPack Setup ", "Choose Install Location")
    WinActivate("TTPack Setup ", "Choose Install Location")
    ControlSetText("TTPack Setup ", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup ", "", "Edit1", $INSTALLLOCATION)
    ControlClick("TTPack Setup ", "", "Button2")

  ; ReaLite's Options
    WinWait("TTPack Setup", "ReaLite's Options")
    WinActivate("TTPack Setup", "ReaLite's Options")
    ControlSetText("TTPack Setup ", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup ", "", "Edit1", $MediaPlayer)
    ControlClick("TTPack Setup", "", "Button2")

  ; Alternative Browsers' Options
    WinWait("TTPack Setup", "Alternative Browsers' Options")
    WinActivate("TTPack Setup", "Alternative Browsers' Options")
    ControlSetText("TTPack Setup", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit1", $PluginsFolder)
    ControlSetText("TTPack Setup", "", "Edit2", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit2", $ComponentsFolder)
    ControlClick("TTPack Setup", "", "Button2")

  ; Choose Start Menu Folder
    WinWait("TTPack Setup ", "Choose Start Menu Folder")
    WinActivate("TTPack Setup ", "Choose Start Menu Folder")
    ControlSetText("TTPack Setup", "", "Edit1", "")
    Sleep(1000)
    ControlSetText("TTPack Setup", "", "Edit1", $StartMenuFolder)
    ControlClick("TTPack Setup ", "", "Button2")

  ; Installation Complete
    WinWait("TTPack Setup ", "Installation Complete")
    WinActivate("TTPack Setup ", "Installation Complete")
    ControlClick("TTPack Setup ", "", "Button2")

  ; Completing the TTPack Setup Wizard
    WinWait("TTPack Setup ", "Completing the TTPack Setup Wizard")
    WinActivate("TTPack Setup ", "Completing the TTPack Setup Wizard")
    ControlClick("TTPack Setup ", "", "Button2")
EndIf

Func _OSBit()
    Local $tOS = DllStructCreate("char[256]")
    Local $aGSWD = DllCall("Kernel32.dll", "int", "GetSystemWow64Directory", "ptr", DllStructGetPtr($tOS), "int", 256)
    If IsArray($aGSWD) And DllStructGetData($tOS, 1) Then Return 64
    Return 32
EndFunc

Read it and learn.
Cheers.

This post has been edited by radix: 15 April 2008 - 06:56 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy