QUOTE (nirh @ Jul 30 2008, 03:07 PM)

Hi,
Can anyone help me out and make me an autoit setup for No-IP Software..
Check this one:
CODE
Opt("TrayIconDebug", 1)
; Installer file name
$Installer = "ducsetup.exe"
; Windows title
$Title = "Installing No-IP DUC v2.2.1"
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()
If $OS = 32 Then
; Installation folder
$Installocation = @ProgramFilesDir & "\No-IP"
$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\No-IP.com DUC", "UninstallString")
If StringRight($PreviousInstallation, 12) = '" -uninstall' Then
$PreviousInstallation = StringTrimRight($PreviousInstallation, 12)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of No-IP.com DUC before using this script", 4)
Exit
EndIf
EndIf
If $OS = 64 Then
; Installation folder
$Installocation = @HomeDrive & "\Program Files (x86)\No-IP"
$PreviousInstallation = RegRead("HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\No-IP.com DUC", "UninstallString")
If StringRight($PreviousInstallation, 12) = '" -uninstall' Then
$PreviousInstallation = StringTrimRight($PreviousInstallation, 12)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of No-IP.com DUC before using this script", 4)
Exit
EndIf
EndIf
; Run the installer
Run($Installer)
; Introduction
WinWait($Title, "Introduction")
WinActivate($Title, "Introduction")
ControlClick($Title, "", "TButton2")
; Installer Setup
WinWait($Title, "Installer Setup")
WinActivate($Title, "Installer Setup")
ControlSetText($Title, "", "TJvDirectoryEdit1", "")
Sleep(1000)
ControlSetText($Title, "", "TJvDirectoryEdit1", $Installocation)
ControlCommand($Title, "", "TCheckBox3", "UnCheck", "")
ControlCommand($Title, "", "TCheckBox2", "UnCheck", "")
ControlCommand($Title, "", "TCheckBox1", "UnCheck", "")
ControlClick($Title, "", "TButton2")
; Copy Files
WinWait($Title, "Copy Files")
WinActivate($Title, "Copy Files")
ControlClick($Title, "", "TButton2")
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