PDA

Показать полную графическую версию : Автоматическая установка Alcohol 120%, 52%


Страниц : 1 2 3 [4] 5 6 7 8 9 10

hobbit25
27-11-2008, 01:47
unikum111, а для Alcohol 52% 1.9.8.7117 сваяеш?! чтоб на живую становилось

katok888
29-11-2008, 13:32
hobbit25, вот этот скрипт прекрасно справляется с установкой
Alcohol 120% 1.9.8.7117
#region - Alcohol.120.v1.9.8.7117 install script - (Automated with WinExists functions)

#include <IE.au3>
Opt('TrayIconDebug', 1)

; Installer.
$executable = 'Alcoholsetup.exe'
; Show progess.
$splash = 0
; Default catagory folder in startmenu.
$group = 'Alcohol 120%'
; New catagory to move the default folder into.
$catagory = ''
; Installation folder in Program Files.
$directory = 'Alcohol Soft\Alcohol 120'
; Allowed time for installation.
$allowed = 60 * 1000
; Components to choose. 1 = Yes, 0 = No.
$SecACID = 1 ; A.C.I.D Wizard
$langfiles = 1 ; Multi-Language Files
$manual = 0 ; Online manual
$shortcuts = 1 ; Desktop Shortcut
$startmenu = 1 ; Startmenu Entries
$starwind = 0 ; iSCSI Service

; ----- Settings Complete (Paste registration on line 83) ------

; Set components to install via registry.
$key = 'HKLM\SOFTWARE\Alcohol Soft\Alcohol 120%\AddRemove\Components'
RegWrite($key & '\SecACID', 'Installed', 'Reg_Dword', $SecACID)
RegWrite($key & '\SecLangFiles', 'Installed', 'Reg_Dword', $langfiles)
RegWrite($key & '\SecManual', 'Installed', 'Reg_Dword', $manual)
RegWrite($key & '\SecShortcuts', 'Installed', 'Reg_Dword', $shortcuts)
RegWrite($key & '\SecStartMenu', 'Installed', 'Reg_Dword', $startmenu)
RegWrite($key & '\SecStarWind', 'Installed', 'Reg_Dword', $starwind)

; Run the installer.
$pid = _Install()
$time = TimerInit()
$title = 'Alcohol 120%'
Do
Select
Case WinExists($title, 'Already Installed')
_Abort()

Case WinExists($title, 'Welcome to the Alcohol 120%')
WinMove($title, 'Welcome to the Alcohol 120%', @DesktopWidth, 0)
ControlClick($title, 'Welcome to the Alcohol 120%', 'Button2')

Case WinExists($title, 'License Agreement')
ControlClick($title, 'License Agreement', 'Button2')

Case WinExists('Alcohol Soft Setup', 'Additional Features and License Agreement')
WinMove('Alcohol Soft Setup', 'Additional Features and License Agreement', @DesktopWidth, 0)
Sleep(1000)
$oIE = _IEAttach ('Alcohol Soft Setup', 'embedded')
If IsObj($oIE) Then
$oSubmit = _IEGetObjByName ($oIE, "chk1")
If IsObj($oSubmit) Then
_IEAction ($oSubmit, "click")
EndIf
_IELoadWait ($oIE)
$oIE = 0
EndIf
ControlClick('Alcohol Soft Setup', 'Additional Features and License Agreement', 'Button2')
WinWaitClose('Alcohol Soft Setup', 'Additional Features and License Agreement', 1)

Case WinExists($title, 'Choose Components')
ControlClick($title, 'Choose Components', 'Button2')

Case WinExists($title, 'Choose Install Location')
ControlClick($title, 'Choose Install Location', 'Button2')

Case WinExists($title, 'Click Finish to close this wizard')
ControlCommand($title, 'Click Finish to close this wizard', 'Button4', 'UnCheck'); Run
;ControlCommand($title, 'Click Finish to close this wizard', 'Button5', 'UnCheck'); Add Drive
ControlClick($title, 'Click Finish to close this wizard', 'Button2')

Case Else
Sleep(250)
EndSelect
If TimerDiff($time) > $allowed Then _Abort()
Until Not ProcessExists($pid)

; *** Paste Registration on the next line ***


; Exit if $startmenu = 0 from above.
If Not $startmenu Then Exit

; Remove shortcuts.
If _MainShortcut('Alcohol 120%.lnk') Then
FileDelete('Alcohol Command Launcher.lnk')
FileDelete('Alcohol Manual.lnk')
;~ FileDelete('Uninstall Alcohol 120%.lnk')
;~ _Desktop('Alcohol 120%.lnk')
EndIf

#endregion

Exit

Func _Install($path = Default)
; Run the installer in Default Script directory.
Dim $splash
If $path = Default Then $path = @ScriptDir
If StringRight($path, 1) <> '\' Then $path &= '\'
If StringInStr($executable, '\') Then $path = ''
If Not FileExists($path & $executable) Then Exit 1
If $splash Then _Splash('Installing:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))
If StringRight($executable, 3) = 'msi' Then
Return Run('"' & @SystemDir & '\msiexec.exe" /i "' & $path & $executable & '"')
Else
Return Run('"' & $path & $executable & '"')
EndIf
EndFunc

Func _Abort()
; close process if exists then exit.
Dim $pid
If ProcessExists($pid) Then
ProcessClose($pid)
Exit 2
Else
Exit 3
EndIf
EndFunc

Func _Desktop($shortcut)
; Delete a Desktop shortcut.
If FileExists(@DesktopDir & '\' & $shortcut) Then
Return FileDelete(@DesktopDir & '\' & $shortcut)
ElseIf FileExists(@DesktopCommonDir & '\' & $shortcut) Then
Return FileDelete(@DesktopCommonDir & '\' & $shortcut)
EndIf
EndFunc

Func _MainShortcut($shortcut, $rename = '')
; Change working directory to correct StartMenu\Group directory.
Dim $group, $catagory, $splash
If $group = '' Then Return 0
If FileExists(@ProgramsDir & '\' & $group) Then
FileChangeDir(@ProgramsDir & '\' & $group)
ElseIf FileExists(@ProgramsCommonDir & '\' & $group) Then
FileChangeDir(@ProgramsCommonDir & '\' & $group)
Else
Return 0
EndIf
; Wait for main shortcut.
If $splash Then _Splash('Waiting for shortcuts')
For $i = 1 To 20
If FileExists($shortcut) Then ExitLoop
Sleep(500)
Next
If $splash Then _Splash('Cleaning up:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))
; If catagory not assigned anything, then return.
If $catagory = '' Then Return 1
; Move the group folder into the catagory folder.
If FileChangeDir('..') And DirCopy($group, $catagory & '\' & $group, 1) Then
If DirRemove($group, 1) Then
; If optional rename parameter is used, then rename the group folder.
If $rename <> '' And FileChangeDir($catagory) Then
If DirCopy($group, $rename, 1) And DirRemove($group, 1) Then
Return FileChangeDir($rename)
EndIf
Else
Return FileChangeDir($catagory & '\' & $group)
EndIf
EndIf
EndIf
EndFunc

Func _QuickLaunch($shortcut)
; Delete a Quicklaunch shortcut.
Local $subdirs = '\Microsoft\Internet Explorer\Quick Launch'
If FileExists(@AppDataDir & $subdirs & '\' & $shortcut) Then
Return FileDelete(@AppDataDir & $subdirs & '\' & $shortcut)
ElseIf FileExists(@AppDataCommonDir & $subdirs & '\' & $shortcut) Then
Return FileDelete(@AppDataCommonDir & $subdirs & '\' & $shortcut)
EndIf
EndFunc

Func _Splash($text = '')
; Shows a small borderless splash message.
Dim $splash
If $splash Then
If $text Then
SplashTextOn('', $text, 500, 25, -1, 5, 1, '', 14)
Else
SplashOff()
EndIf
EndIf
EndFunc

Func _WinClose($title, $text = '')
; Close a window with further attempts.
For $i = 1 To 10
WinClose($title, $text)
If Not WinExists($title) Then Return 1
Sleep(500)
Next
EndFunc

Func OnAutoItStart()
; A 2nd script instance will exit.
Local $interpreter
$interpreter = StringTrimRight(@ScriptName, 4) & ' Script Interpreter'
If WinExists($interpreter) Then Exit
AutoItWinSetTitle($interpreter)
EndFunc

думаю после небольшого редактирования подойдет и для Alcohol 52%.

conductor
30-11-2008, 12:23
вот этот скрипт прекрасно справляется с установкой Alcohol 120% 1.9.8.7117 »
А готовый комплект можно

katok888
30-11-2008, 14:30
conductor, на ру-борде все есть. Для регистрации создал SFX RAR архив с комментарием:
Path="%PROGRAMFILES%\Alcohol Soft\Alcohol 120"
SavePath
Setup=PatCh312.exe /VERYSILENT
Silent=1
Overwrite=1

Malfatto
30-11-2008, 21:01
Можно ли установить Alcohol 52% автоматически, используя только ключи? Если нет, то можно ли препаковать? Будет ли предложение, если, например, устанвоить, скопировать и запихнуть в Inno Setup?

conductor
30-11-2008, 22:33
conductor, на ру-борде все есть. Для регистрации создал SFX RAR архив с комментарием:
Код:
Path="%PROGRAMFILES%\Alcohol Soft\Alcohol 120"
SavePath
Setup=PatCh312.exe /VERYSILENT
Silent=1
Overwrite=1 »
зы я по другому
;!@Install@!UTF-8!
GUIMode="2"
RunProgram="patch.exe /VERYSILENT "
;!@InstallEnd@!

unikum111
01-12-2008, 16:43
Выложенный мной ранее скрипт актуален для последней версии!
Сегодня проверил.

katok888
01-12-2008, 19:41
conductor, зы я по другому
;!@Install@!UTF-8!
GUIMode="2"
RunProgram="patch.exe /VERYSILENT "
;!@InstallEnd@! »
С таким же успехом можно patch.exe /VERYSILENT
без запаковки в 7z. насколько я помню патч нужно запустить из папки Алкаша.

unikum111
01-12-2008, 21:15
Поправил шапку. Добавил скрипт, выложенный katok888.

vadimkapetrov
05-12-2008, 12:14
не получается запустить пакет алмезы в тихом режиме, подскажет кто-нибудь

joe mann
10-12-2008, 16:41
думаю после небольшого редактирования подойдет и для Alcohol 52%. »
Для 52% нужно добавить следующие строчки в Select:
Case WinExists( $title, 'Not for Business Use' )
ControlClick( $title, 'Not for Business Use', 'Button4' )
ControlClick( $title, 'Not for Business Use', 'Button2' )
Ну и везде 120 заменить на 52 :)

Pozia
04-01-2009, 01:46
Народ. Подскажите что с этим скриптом делать? Как сделать тихий инстал? Можно ли краткое описание?

katok888
04-01-2009, 09:17
Pozia, Скрипт нужно скомпилировать с помощью программы AutoIT (http://www.autoitscript.com/autoit3/) и положить скомпилированный .exe рядом с программой. Для установки программы запускать нужно скомпилированный .exe. Остальное (регистрация и тп) смотри на страницах темы , я уже описывал.

Pozia
04-01-2009, 10:22
katok888, а название Alcohol.exe может быть произвольным или какое то определенное?

katok888
04-01-2009, 10:36
Pozia, В скрипте, который предложил я, название оригинальной программы - Alcoholsetup.exe, а название скомпилированного скрипта - любое.

Pozia
04-01-2009, 10:40
katok888, разобрался и установил. Огромное спасибо!!! Такой мелкий вопрос - при установке мелькает окошко алкоголя. От его нельзя избавиться?

conductor
08-01-2009, 13:57
katok888, разобрался и установил. Огромное спасибо!!! Такой мелкий вопрос - при установке мелькает окошко алкоголя. От его нельзя избавиться? »RunProgram="hidcon:avira.cmd"
типа того с помощью волшебной кнопки сам ещё не делал но тоже не люблю мелькание

katok888
08-01-2009, 14:15
conductor, там никаких .cmd нет. Как и 7zSFX.

Pozia
08-01-2009, 18:23
RunProgram="hidcon:avira.cmd" »
подробнее можно? я в скриптах полный ноль :)

vipnucleus
10-01-2009, 12:56
Было бы замечательно если будет ссылка на готовый вариант!!!




© OSzone.net 2001-2012