MSFN Forum: Daemon Tools 4.08 (AutoIt Launcher) - 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
  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

Daemon Tools 4.08 (AutoIt Launcher) Silent Installer Rate Topic: -----

#41 User is offline   darks0ul 

  • Member
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 15-September 04

Posted 19 January 2008 - 10:36 AM

View Postkal, on Jan 19 2008, 06:29 AM, said:

daemon Tools Lite 4.12 is out. By the way, at the end of the installation, an IE/Firefox window is launched :(

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.


#42 User is offline   kal 

  • Member
  • PipPip
  • Group: Members
  • Posts: 114
  • Joined: 07-March 04

Posted 19 January 2008 - 05:36 PM

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

Kal

#43 User is offline   SyntaxError 

  • Member
  • PipPip
  • Group: Members
  • Posts: 147
  • Joined: 04-January 05
  • OS:none specified
  • Country: Country Flag

Posted 27 January 2008 - 02:48 PM

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: 27 January 2008 - 03:20 PM


#44 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 30 January 2008 - 03:24 AM

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 :)

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.

#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)
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
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: 17 February 2008 - 06:38 PM


#45 User is offline   Solid as a rock 

  • So solid as a rock is
  • PipPipPipPipPip
  • Group: Members
  • Posts: 718
  • Joined: 30-May 04

Posted 16 February 2008 - 09:59 AM

View PostAcheron, on Jan 30 2008, 10:24 AM, said:

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 :)

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.

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

#46 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 17 February 2008 - 04:48 PM

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.

#47 User is offline   radix 

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

Posted 17 February 2008 - 06:20 PM

View PostAcheron, on Feb 18 2008, 12:48 AM, said:

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:
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: 13 March 2008 - 01:11 PM


#48 User is offline   ricktendo64 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,120
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 February 2008 - 10:22 PM

Very smart radix... Will it also delete the adware?

#49 User is offline   radix 

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

Posted 18 February 2008 - 04:33 AM

View Postricktendo64, on Feb 18 2008, 06:22 AM, said:

Very smart radix... Will it also delete the adware?

Yes

#50 User is offline   squizo 

  • Group: Members
  • Posts: 2
  • Joined: 21-July 07

Posted 22 February 2008 - 08:39 AM

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

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 :)

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: 22 February 2008 - 08:46 AM


#51 User is offline   radix 

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

Posted 22 February 2008 - 09:05 AM

View Postsquizo, on Feb 22 2008, 04:39 PM, said:

The question is: if i erase 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


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 :)

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.
 

#52 User is offline   squizo 

  • Group: Members
  • Posts: 2
  • Joined: 21-July 07

Posted 22 February 2008 - 09:45 AM

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: 22 February 2008 - 09:45 AM


#53 User is offline   radix 

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

Posted 17 March 2008 - 09:30 AM

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

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

Edit

This post has been edited by radix: 19 March 2008 - 07:00 AM


#54 User is offline   radix 

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

Posted 03 April 2008 - 07:01 AM

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

Attached File(s)


This post has been edited by radix: 03 April 2008 - 07:05 AM


#55 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 03 April 2008 - 01: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.

#56 User is offline   radix 

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

Posted 03 April 2008 - 02:42 PM

View PostAcheron, on Apr 3 2008, 09:18 PM, said:

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.

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
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DAEMON Tools Lite
.
These are the reasons for 64-bit translation stuff.

#57 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 04 April 2008 - 03: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.

#58 User is offline   radix 

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

Posted 04 April 2008 - 05:30 AM

View PostAcheron, on Apr 4 2008, 11:32 AM, said:

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.

#59 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 02 May 2008 - 04:24 PM

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.

#60 User is offline   microbion 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 17-January 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 May 2008 - 08:17 AM

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.


 
; Script Start - Add your code below here

Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "daemon4123-lite.exe"
[color="#FF0000"][b]$WINDOWTITLEVERSION = "DAEMON Tools Lite 4.12.3"[/b][/color]

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


PS: salutari din germania :D

This post has been edited by microbion: 03 May 2008 - 08:19 AM


Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • 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