IPB

Google Frontpage Forums Unattended CD/DVD Guide

> 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

4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
> Daemon Tools 4.08 (AutoIt Launcher), Silent Installer
darks0ul
post Jan 19 2008, 10:36 AM
Post #41


Member
**

Group: Members
Posts: 125
Joined: 15-September 04
Member No.: 31158



QUOTE (kal @ Jan 19 2008, 06:29 AM) *
daemon Tools Lite 4.12 is out. By the way, at the end of the installation, an IE/Firefox window is launched sad.gif

Anyone knows how to solve this ?
Kal

The above script closes the browser when it's launched. There's nothing else I can do to prevent it the installer from launching it, I think.
Go to the top of the page
 
+Quote Post
kal
post Jan 19 2008, 05:36 PM
Post #42


Member
**

Group: Members
Posts: 114
Joined: 7-March 04
From: Paris
Member No.: 15504
OS: XP Pro x86
Country Flag


Ok, I didn't analyze the script. Hope the developper team will correct this sad.gif

Kal
Go to the top of the page
 
+Quote Post
SyntaxError
post Jan 27 2008, 02:48 PM
Post #43


Member
**

Group: Members
Posts: 100
Joined: 4-January 05
From: North Carolina
Member No.: 39945
OS: Windows 7 x64
Country Flag


It seems to me that all of you are making this alot harder than it has to be, unless I'm missing something.

Since Dtools uses the NSIS installer, why not just unpack the install file with Universal Extractor, then repack it with silent install options. I'm working on it right now. Never done anything like this, but how hard can it be?

*Nevermind, the .nsi script for Dtools is alot more complex than it needs to be and it can't be recompiled because it's not written correctly.

This post has been edited by SyntaxError: Jan 27 2008, 03:20 PM
Go to the top of the page
 
+Quote Post
Acheron
post Jan 30 2008, 03:24 AM
Post #44


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


Good news is that AutoIt 3.2.11.0 beta is out which fixes the script. Sadly in Daemon Tools 4.12.1 it is not possible to use the keyboard to control the settings menu. I think it would be best to get the Window size and position of the window and then use the Mouse to click, but I could not accomplish that yet .

Done smile.gif

Note this script is still a work in progress and requires AutoIt 3.2.11.0 beta or higher. This code will enable/disable secure mode, but might be tweaked to also support enabling/disabling toolbar and autoupdate settings.

CODE
#NoTrayIcon
#RequireAdmin
#include <GuiConstantsEx.au3>
#Include <GuiToolBar.au3>
opt("WinTitleMatchMode",4)
Run(@ProgramFilesDir & "\DAEMON TOOLS\daemon.exe")
;Wait for Daemon Tools installation to be finished
If WinWait("DAEMON Tools", "Please wait ...", 5) Then
    WinWaitClose("DAEMON Tools", "Please wait ...", 120)
EndIf
;Configure Daemon Tools (secure mode off)
$hToolBar = WinGetHandle("[CLASS:Shell_TrayWnd]", "")
$hSysTray = ControlGetHandle($hToolBar, "", "ToolbarWindow321")
$BtnCnt = _GUICtrlToolbar_ButtonCount($hSysTray)
$BtnTxt = "DAEMON Tools"
;Search for the right icon on the tray
$i = 0
While $i < $BtnCnt
    If StringLeft(_GUICtrlToolbar_GetButtonText($hSysTray, $i),12) = $BtnTxt Then
        $BtnNum = $i
        ExitLoop
    EndIf
$i += 1
WEnd
If IsDeclared("BtnNum") Then
;Right click on the button and switch the secure mode option
;Open option menu
_GUICtrlToolbar_ClickButton($hSysTray, $BtnNum, "right")
;Wait for Daemon Tools menu
WinWait("[CLASS:#32768]", "", 5)
$hnd = WinGetHandle("[LAST]")
EndIf
If Not @error Then
    SendKeepActive("[LAST]")
    ControlSend("[LAST]", "", "", "{UP}{UP}{UP}{UP}{UP}{RIGHT}{DOWN}")
    $size = WinGetPos("[CLASS:#32768]")
EndIf
If Not @error Then
;Default DTPanel off / on
    If ($size[2] = 158 AND ($size[3] = 186 OR $size[3] = 206)) Then
        $PosXSecureMode = $size[0] + 18
        $PosYSecureMode = $size[1] + 32
;Get current menutext color
        $color_menutext = StringSplit(RegRead("HKCU\Control Panel\Colors","MenuText"), " ")
        If Not @error Then
            $color_menutext = Dec(Hex($color_menutext[1],2) & Hex($color_menutext[2],2) & Hex($color_menutext[3],2))
        Else
    ;Default menutext is black
            $color_menutext = 0
        EndIf
;Check if Securemode is on    
        If PixelGetColor($PosXSecureMode, $PosYSecureMode) = $color_menutext Then
    ;Switch secure mode off
            MouseClick("left", $PosXSecureMode, $PosYSecureMode)
            Sleep(500)
        Else
    ;Minimize Daemon Tools Menu
            WinSetState("[LAST]", "", @SW_MINIMIZE)
        EndIf
    EndIf
EndIf


install.cmd (T12)
CODE
title Daemon Tools 4.12.1

::settings added to current user runonce section will be installed when desktop is loaded!
::Note @T12 %cd% doesn't work
set CurrentPath=%~dp0
set CurrentPath=%CurrentPath:~0,-1%
set CurrentUserRunOnce=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

::Note SPTD Driver v1.55 included with Daemon Tools 4.12.1
::otherwise use SPTDinstaller with 'add /q'

::you have to reboot or Daemon Tools won't be installed
daemon4121-lite.exe /S

::Install Daemon Tools when desktop is loaded
reg add "%CurrentUserRunOnce%" /v "Daemon Tools 4.12.1" /d "\"%CurrentPath%\..\..\runhidden.exe\" \"%CurrentPath%\" config.cmd" /f
exit


config.cmd
CODE
title Daemon Tools 4.12.1

::Uninstall information
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\dtools" /v "DisplayName" /d "Daemon Tools 4.12.1" /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\dtools" /v "UninstallString" /d "%ProgramFiles%\DAEMON Tools\uninst.exe" /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\dtools" /v "InstallLocation" /d "%ProgramFiles%\DAEMON Tools" /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\dtools" /v "DisplayIcon" /d "%ProgramFiles%\DAEMON Tools\daemon.exe" /f

::Remove adware
del /f /q "%programfiles%\daemon tools\AdVantageSetup.exe"

::Launch Daemon Tools and configure settings - requires AutoIT 3.2.11 beta
autoit3 config_daemontools.au3

::ArniWorX Daemon Tools Shell Extension
awxDTools1060.exe /VERYSILENT /NORESTART

exit


This post has been edited by Acheron: Feb 17 2008, 06:38 PM
Go to the top of the page
 
+Quote Post
Solid as a rock
post Feb 16 2008, 09:59 AM
Post #45


So solid as a rock is
*****

Group: Members
Posts: 718
Joined: 30-May 04
Member No.: 21053
Country Flag


QUOTE (Acheron @ Jan 30 2008, 10:24 AM) *
Good news is that AutoIt 3.2.11.0 beta is out which fixes the script. Sadly in Daemon Tools 4.12 it is not possible to use the keyboard to control the settings menu. I think it would be best to get the Window size and position of the window and then use the Mouse to click, but I could not accomplish that yet .

Done smile.gif

Note this script is still a work in progress and requires AutoIt 3.2.11.0 beta or higher. This code will enable/disable secure mode, but might be tweaked to also support enabling/disabling toolbar and autoupdate settings.

CODE
#requireadmin
#include <GuiConstantsEx.au3>
#Include <GuiToolBar.au3>
opt("WinTitleMatchMode",4)
Run(@ProgramFilesDir & "\DAEMON TOOLS\daemon.exe")
;WinWaitClose("DAEMON Tools", "Please wait ...", 120)
;If WinWait("DAEMON Tools", "Please wait ...", 5) Then
;Configure Daemon Tools (secure mode off)
    $hToolBar = WinGetHandle("[CLASS:Shell_TrayWnd]", "")
    $hSysTray = ControlGetHandle($hToolBar, "", "ToolbarWindow321")
    $BtnCnt = _GUICtrlToolbar_ButtonCount($hSysTray)
    $BtnTxt = "DAEMON Tools"
;Search for the right icon on the tray
    $i = 0
    While $i < $BtnCnt
        If StringLeft(_GUICtrlToolbar_GetButtonText($hSysTray, $i),12)=$BtnTxt Then
            $BtnNum = $i
            ExitLoop
        EndIf
    $i += 1
    WEnd
    If IsDeclared("BtnNum") Then
;Right click on the button and switch the secure mode option
;Open option menu
    _GUICtrlToolbar_ClickButton($hSysTray, $BtnNum, "right")
;Wait for Daemon Tools menu
    WinWait("[CLASS:#32768]", "", 5)
    $hnd = WinGetHandle("[LAST]")
    If Not @error Then
        SendKeepActive ("[LAST]")
        ControlSend("[LAST]", "", "", "{UP}{UP}{UP}{UP}{UP}{RIGHT}{DOWN}")
        $size = WinGetPos("[CLASS:#32768]")
        If Not @error Then
;Default DTPanel off / on
            If ($size[2] = 152 AND ($size[3] = 170)) OR    ($size[2] = 158 AND ($size[3] = 156 OR $size[3] = 176)) Then
;Switch secure mode off
                MouseClick("left",$size[0] + 16, $size[1] + 34)
            EndIf
        EndIf
    EndIf
EndIf

Nice script. Would it work at any screensize? I have 1680x1050.

By the way, 4.12.1 is out...
Go to the top of the page
 
+Quote Post
Acheron
post Feb 17 2008, 04:48 PM
Post #46


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


I have updated the script in last post to work with Daemon Tools 4.12.1. This script should work at any screen size. The mouse position is related to the Window position of the Daemon Tools right click menu.

I still have to do some actual tests to make sure Daemon Tools get unattended installed. My idea is to install Daemon Tools at T12 using install.cmd. Daemon Tools need a reboot, so I can't configure Daemon Tools until desktop is loaded for the first time.
Go to the top of the page
 
+Quote Post
radix
post Feb 17 2008, 06:20 PM
Post #47


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


QUOTE (Acheron @ Feb 18 2008, 12:48 AM) *
I have updated the script in last post to work with Daemon Tools 4.12.1. This script should work at any screen size. The mouse position is related to the Window position of the Daemon Tools right click menu.

I still have to do some actual tests to make sure Daemon Tools get unattended installed. My idea is to install Daemon Tools at T12 using install.cmd. Daemon Tools need a reboot, so I can't configure Daemon Tools until desktop is loaded for the first time.

The new addon inside Daemon Tools is SRSAI.exe.
I have installed SPTD from T13 with add /q switch and Daemon Tools from RunOnce with this script:
CODE
Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "daemon4121-lite.exe"
; Run Daemon Tools on Windows startup
$autostart = 0
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()

If $OS = 32 Then
; Installation folder
    $INSTALLLOCATION = @ProgramFilesDir & "\DAEMON Tools Lite"
        If FileExists($INSTALLLOCATION & "\daemon.exe") Then
        MsgBox(0x40010, @ScriptName, "Please uninstall previous version of DAEMON Tools before using this script", 4)
        Exit
    EndIf
       ; Disable the default internet browser (to prevent SRSAI.exe to open it)
    $DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
    RegDelete("HKCR\HTTP\shell\open\command\", "")

   ; Read from registry which is the home page of Internet Explorer (to restore it after the installation of DAEMON Tools Lite)
    $HomePage = RegRead("HKCU\Software\Microsoft\Internet Explorer\Main", "Start Page")

   ; Run the installer
    Run($EXECUTABLE & " /S")
       ; Start checking for a window with "Please select a language." text inside
    AdlibEnable('_Adlib')

; Kill SRSAI.exe process
    ProcessWait("SRSAI.exe")
    $PID = ProcessExists("SRSAI.exe")
    If $PID Then
        ProcessClose($PID)
    EndIf
    ; Stop checking for a window with "Please select a language." text inside
    AdlibDisable()

    Sleep(2000)

   ; Delete SRSAI.exe file
    FileDelete($INSTALLLOCATION & "\SRSAI.exe")

   ; Restore the default internet browser
    RegWrite("HKCR\HTTP\shell\open\command\", "", "REG_SZ", $DefBrowser)

   ; Restore the home page of Internet Explorer
    RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "", "REG_SZ", $HomePage)
    ; Block daemon.exe to run on Windows startup
    If $autostart = 0 Then
        RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite")
    EndIf

   ; Add uninstall entries
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayName", "REG_SZ", "DAEMON Tools Lite 4.12.1")
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "UninstallString", "REG_SZ", $INSTALLLOCATION & "\uninst.exe")
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "InstallLocation", "REG_SZ", $INSTALLLOCATION)
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayIcon", "REG_SZ", $INSTALLLOCATION & "\daemon.exe")
EndIf

If $OS = 64 Then
; Installation folder
    $INSTALLLOCATION = @HomeDrive & "\Program Files (x86)\DAEMON Tools Lite"
        If FileExists($INSTALLLOCATION & "\daemon.exe") Then
        MsgBox(0x40010, @ScriptName, "Please uninstall previous version of DAEMON Tools before using this script", 4)
        Exit
    EndIf
       ; Disable the default internet browser (to prevent SRSAI.exe to open it)
    $DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
    RegDelete("HKCR\HTTP\shell\open\command\", "")

   ; Read from registry which is the home page of Internet Explorer (to restore it after the installation of DAEMON Tools Lite)
    $HomePage = RegRead("HKCU\Software\Microsoft\Internet Explorer\Main", "Start Page")

   ; Run the installer
    Run($EXECUTABLE & " /S")
    ; Start checking for a window with "Please select a language." text inside
    AdlibEnable('_Adlib')

; Kill SRSAI.exe process
    ProcessWait("SRSAI.exe")
    $PID = ProcessExists("SRSAI.exe")
    If $PID Then
        ProcessClose($PID)
    EndIf
    ; Stop checking for a window with "Please select a language." text inside
    AdlibDisable()

    Sleep(2000)

   ; Delete SRSAI.exe file
    FileDelete($INSTALLLOCATION & "\SRSAI.exe")

   ; Restore the default internet browser
    RegWrite("HKCR\HTTP\shell\open\command\", "", "REG_SZ", $DefBrowser)

   ; Restore the home page of Internet Explorer
    RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "", "REG_SZ", $HomePage)
    ; Block daemon.exe to run on Windows startup
    If $autostart = 0 Then
        RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite")
    EndIf

   ; Add uninstall entries
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayName", "REG_SZ", "DAEMON Tools Lite 4.12.1")
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "UninstallString", "REG_SZ", $INSTALLLOCATION & "\uninst.exe")
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "InstallLocation", "REG_SZ", $INSTALLLOCATION)
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayIcon", "REG_SZ", $INSTALLLOCATION & "\daemon.exe")
EndIf

Func _Adlib()
   ; Please select a language.
    If WinExists("DAEMON Tools Lite 4.12.1", "Please select a language.") Then
        WinActivate("DAEMON Tools Lite 4.12.1", "Please select a language.")
        ControlClick("DAEMON Tools Lite 4.12.1", "", "Button1")
    EndIf
EndFunc

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

Maybe is useful.
Edit again. 

This post has been edited by radix: Mar 13 2008, 01:11 PM
Go to the top of the page
 
+Quote Post
ricktendo64
post Feb 17 2008, 10:22 PM
Post #48


Group: Banned Members
*******

Group: Members
Posts: 1636
Joined: 6-June 06
From: Honduras
Member No.: 98200
OS: Vista Ultimate x86
Country Flag


Very smart radix... Will it also delete the adware?
Go to the top of the page
 
+Quote Post
radix
post Feb 18 2008, 04:33 AM
Post #49


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


QUOTE (ricktendo64 @ Feb 18 2008, 06:22 AM) *
Very smart radix... Will it also delete the adware?

Yes
Go to the top of the page
 
+Quote Post
squizo
post Feb 22 2008, 08:39 AM
Post #50





Group: Members
Posts: 2
Joined: 21-July 07
Member No.: 147441
OS: none
Country Flag


Hello, first sorry for my "tarzan-english". I am spanish from Madrid, España.

I download daemons lite 4121.
As you say nod 32 detect spyware in SRSAI.exe.
I unpack with universal extractor.
I delete SRSAI.exe.

I see and read [NSIS].nsi archive.

search into archive [NSIS].nsi and see only one reference to SRSAI in this part:

SetOutPath $INSTDIR
File SRSAI.exe
Execute 49043 0 0
StrCpy $[43] "1"
Return
SetFlag 13 47631
StrCpy $[41] "1"
Return
SetFlag 13 162
UpdateSatusText Installing Desktop Shortcut... 0
SetFlag 13 47631
SetOutPath $INSTDIR


I suspect that say to the installer -copy this archive (SRSAI) in install directory.

This part start in "SetOutPath $INSTDIR" and ending in "SetFlag 13 47631"

The next "instruction" is a new "SetOutPath $INSTDIR" i think.


The question is: if i erase this part

CODE
SetOutPath $INSTDIR
File SRSAI.exe
Execute 49043 0 0
StrCpy $[43] "1"
Return
SetFlag 13 47631
StrCpy $[41] "1"
Return
SetFlag 13 162
UpdateSatusText Installing Desktop Shortcut... 0
SetFlag 13 47631


and repack all without SRSAI.exe daemon tools work corrctly?

Another question is : what program must use to repack it? HM NIS Edit for example'

The last question smile.gif

Radix - How execute your last script in an active windows ?
QUOTE
Opt("TrayIconDebug", 1)

; Disable the default internet browser (in order to prevent SRSAI.exe to open it)
$DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
RegDelete("HKCR\HTTP\shell\open\command\", "")... ...




Is php code? must i create an archive with .php extension and execute it?

when execute it? before install daemons tools?

Can i create a registry entry for to avoid the install or execution of SRSAI?

Is most easy install daemons complete and after remove the spyware?

I hope you understand me. Sorry for my english again.

Thanks.

This post has been edited by squizo: Feb 22 2008, 08:46 AM
Go to the top of the page
 
+Quote Post
radix
post Feb 22 2008, 09:05 AM
Post #51


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


QUOTE (squizo @ Feb 22 2008, 04:39 PM) *
The question is: if i erase this part

CODE
SetOutPath $INSTDIR
File SRSAI.exe
Execute 49043 0 0
StrCpy $[43] "1"
Return
SetFlag 13 47631
StrCpy $[41] "1"
Return
SetFlag 13 162
UpdateSatusText Installing Desktop Shortcut... 0
SetFlag 13 47631


and repack all without SRSAI.exe daemon tools work corrctly?

Another question is : what program must use to repack it? HM NIS Edit for example'

The last question smile.gif

Radix - How execute your last script in an active windows ?
QUOTE
Opt("TrayIconDebug", 1)

; Disable the default internet browser (in order to prevent SRSAI.exe to open it)
$DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
RegDelete("HKCR\HTTP\shell\open\command\", "")... ...




Is php code? must i create an archive with .php extension and execute it?

when execute it? before install daemons tools?

Can i create a registry entry for to avoid the install or execution of SRSAI?

Is most easy install daemons complete and after remove the spyware?

I hope you understand me. Sorry for my english again.

Thanks.

Hi
The file [NSIS].nsi extracted with Universal Extractor is corrupt. If you are a master in coding Null Soft ya you can repack Daemon Tools.
My code is AutoIt.
 
Go to the top of the page
 
+Quote Post
squizo
post Feb 22 2008, 09:45 AM
Post #52





Group: Members
Posts: 2
Joined: 21-July 07
Member No.: 147441
OS: none
Country Flag


Thanks for the answer.

I am not a master in nothing. I am a stupid. Now i know.

Always scan the files for virus before install with nod 32. This time was a false alarm.

I make a restore point and try install daemontools to see what happen.

This time the solution is easy: when install daemon tools unmark two options and goodbye spyware.



Sorry for your spend time.

And 1000 thanks for help me.

This post has been edited by squizo: Feb 22 2008, 09:45 AM
Go to the top of the page
 
+Quote Post
radix
post Mar 17 2008, 09:30 AM
Post #53


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


New script for new DAEMON Tools Lite 4.12.2 with SPTD 1.56 (works in 32 and 64 bit environment)

CODE
Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "daemon4122-lite.exe"
; Run Daemon Tools on Windows startup
$autostart = 0
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()

If $OS = 32 Then
; Installation folder
    $INSTALLLOCATION = @ProgramFilesDir & "\DAEMON Tools Lite"

If FileExists($INSTALLLOCATION & "\daemon.exe") Then
     MsgBox(0x40010, @ScriptName, "Please uninstall previous version of DAEMON Tools before using this script", 4)
     Exit
    EndIf

   ; Disable the default internet browser (to prevent daemon.exe to open it)
    $DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
    RegDelete("HKCR\HTTP\shell\open\command\", "")

   ; Read from registry which is the home page of Internet Explorer (to restore it after the installation of DAEMON Tools Lite)
    $HomePage = RegRead("HKCU\Software\Microsoft\Internet Explorer\Main", "Start Page")

   ; Run the installer
    Run($EXECUTABLE & " /S")

; Start checking for a window with "Please select a language." text inside
    AdlibEnable('_Adlib')

ProcessWaitClose($EXECUTABLE)

    Sleep(2000)

   ; Restore the default internet browser
    RegWrite("HKCR\HTTP\shell\open\command\", "", "REG_SZ", $DefBrowser)

   ; Restore the home page of Internet Explorer
    RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "", "REG_SZ", $HomePage)

; Block daemon.exe to run on Windows startup
If $autostart = 0 Then
  RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite")
EndIf

   ; Add uninstall entries
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayName", "REG_SZ", "DAEMON Tools Lite 4.12.2")
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "UninstallString", "REG_SZ", $INSTALLLOCATION & "\uninst.exe")
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "InstallLocation", "REG_SZ", $INSTALLLOCATION)
    RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayIcon", "REG_SZ", $INSTALLLOCATION & "\daemon.exe")

; Stop checking for a window with "Please select a language." text inside
    AdlibDisable()
EndIf

If $OS = 64 Then
; Installation folder
    $INSTALLLOCATION = @HomeDrive & "\Program Files (x86)\DAEMON Tools Lite"

If FileExists($INSTALLLOCATION & "\daemon.exe") Then
     MsgBox(0x40010, @ScriptName, "Please uninstall previous version of DAEMON Tools before using this script", 4)
     Exit
    EndIf

   ; Disable the default internet browser (to prevent daemon.exe to open it)
    $DefBrowser = RegRead("HKCR\HTTP\shell\open\command\", "")
    RegDelete("HKCR\HTTP\shell\open\command\", "")

   ; Read from registry which is the home page of Internet Explorer (to restore it after the installation of DAEMON Tools Lite)
    $HomePage = RegRead("HKCU\Software\Microsoft\Internet Explorer\Main", "Start Page")

   ; Run the installer
    Run($EXECUTABLE & " /S")

; Start checking for a window with "Please select a language." text inside
    AdlibEnable('_Adlib')

ProcessWaitClose($EXECUTABLE)

    Sleep(2000)

   ; Restore the default internet browser
    RegWrite("HKCR\HTTP\shell\open\command\", "", "REG_SZ", $DefBrowser)

   ; Restore the home page of Internet Explorer
    RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "", "REG_SZ", $HomePage)

; Block daemon.exe to run on Windows startup
If $autostart = 0 Then
  RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite")
EndIf

   ; Add uninstall entries
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayName", "REG_SZ", "DAEMON Tools Lite 4.12.2")
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "UninstallString", "REG_SZ", $INSTALLLOCATION & "\uninst.exe")
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "InstallLocation", "REG_SZ", $INSTALLLOCATION)
    RegWrite("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite", "DisplayIcon", "REG_SZ", $INSTALLLOCATION & "\daemon.exe")

; Stop checking for a window with "Please select a language." text inside
    AdlibDisable()
EndIf

Func _Adlib()
   ; Please select a language.
If WinExists("DAEMON Tools Lite 4.12.2", "Please select a language.") Then
        ControlClick("DAEMON Tools Lite 4.12.2", "Please select a language.", "Button1")
EndIf
EndFunc

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


Note: Close Internet connection before running the setup (to avoid firewall prompt for downloading
of SRSAI.exe bonus). smile.gif

Edit

This post has been edited by radix: Mar 19 2008, 07:00 AM
Go to the top of the page
 
+Quote Post
radix
post Apr 3 2008, 07:01 AM
Post #54


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


DAEMON Tools Lite 4.12.3 with SPTD 1.56 (works in 32 and 64 bit environment)

Note: Close Internet connection before running the setup (to avoid firewall prompt and add-on download).

This post has been edited by radix: Apr 3 2008, 07:05 AM
Attached File(s)
Attached File  DAEMON_Tools_Lite_4.12.3_with_SPTD_1.56.au3 ( 5.33K ) Number of downloads: 78
 
Go to the top of the page
 
+Quote Post
Acheron
post Apr 3 2008, 01:18 PM
Post #55


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


Radix, what's all that 64-bit translation stuff doing in your script? As long as you compile AutoIt as a 32-bit exe you don't have to do any path translations, as long as you don't hardcode paths.
Go to the top of the page
 
+Quote Post
radix
post Apr 3 2008, 02:42 PM
Post #56


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


QUOTE (Acheron @ Apr 3 2008, 09:18 PM) *
Radix, what's all that 64-bit translation stuff doing in your script? As long as you compile AutoIt as a 32-bit exe you don't have to do any path translations, as long as you don't hardcode paths.

CODE
If FileExists($INSTALLLOCATION & "\daemon.exe") Then
        MsgBox(0x40010, @ScriptName, "Please uninstall previous version of DAEMON Tools before using this script", 4)
        Exit
    EndIf

For the above code the script will check only in Program Files folder. But in 64 bit Windows, Daemon Tools is installed in Program Files (x86) and if you have allready installed Daemon Tools, FileExists will see nothing.
The uninstall entries for 64 bit Windows will go to
CODE
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite
.
These are the reasons for 64-bit translation stuff.
Go to the top of the page
 
+Quote Post
Acheron
post Apr 4 2008, 03:32 AM
Post #57


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


So @ProgramFilesDir is automaticly converted to Program Files (x86) and HKLM\Software\Windows\CurrentVersion\Uninstall should also automaticly get converted to the Wow6432node path.
If this is not correct you should report this as a bug to the AutoIt team.
Go to the top of the page
 
+Quote Post
radix
post Apr 4 2008, 05:30 AM
Post #58


Senior Member
****

Group: Members
Posts: 623
Joined: 8-February 07
Member No.: 125681
OS: XP Pro x86
Country Flag


QUOTE (Acheron @ Apr 4 2008, 11:32 AM) *
So @ProgramFilesDir is automaticly converted to Program Files (x86) and HKLM\Software\Windows\CurrentVersion\Uninstall should also automaticly get converted to the Wow6432node path.
If this is not correct you should report this as a bug to the AutoIt team.

Generally, the path isn't automaticaly converted. I have a script for an application which type the path with ControlSetText command. Application is 32 bit native, but the script doesn't detect
this and type C:\Program Files\blabla\ instead of C:\Program Files (x86)\blabla\ and install into Program Files. On other applications it works right. So is a bug, but is normally because is the first version with
64 bit suport.
Go to the top of the page
 
+Quote Post
Acheron
post May 2 2008, 04:24 PM
Post #59


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


The Daemon Tools installer is not very friendly to install unattendly. Since all kernel stuff is put into the SPTD driver anyway I'm going to create my own installer for it. I'll also try to improve the AutoIt script to set Daemon Tools options.

When I'm done I'll post a link here.
Go to the top of the page
 
+Quote Post
microbion
post May 3 2008, 08:17 AM
Post #60


Newbie


Group: Members
Posts: 23
Joined: 17-January 05
From: Lahr, Germany
Member No.: 41061
OS: none
Country Flag


to make it more flexible for further DT versions change the window title to a variable and replace the titles below (in line 66, 113, 124 and 125) with that variable.


CODE
; Script Start - Add your code below here

Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "daemon4123-lite.exe"
$WINDOWTITLEVERSION = "DAEMON Tools Lite 4.12.3"

; Run Daemon Tools on Windows startup
$autostart = 0
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()


PS: salutari din germania biggrin.gif

This post has been edited by microbion: May 3 2008, 08:19 AM
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

4 Pages V  < 1 2 3 4 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 21st November 2009 - 01:22 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2009 msfn.org
Privacy Policy