Jump to content

Daemon Tools 4.08 (AutoIt Launcher)


darks0ul

Recommended Posts


Just click on the link on my post, the DL link for A3LToolBar.au3 is at the end of the 1st post. Note that you will DL an installer that need autoit to be installed 1st to run properly.

I'm not fully satisfied with this solution that I found a little bit too complex and I will probably integrate both DaemonTools and awxDtools via nlite addons.

Anyway this could help for post installations.

Regards

Edited by XPect
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hi,

I've updated the script to work with 4.10. However, it doesn't seem to work for the first boot of RunOnceEx. If, after booting, I schedule another runonceex install, it does work.

How are you currently installing daemon tools?

PS:


#cs
AutoIt 3.2 Script slightly based on an old Daemon Tools 4.0 script published at the MSFN.org boards.
Author: Guillermo Miranda Alamo
#ce

; Installer.
$Name = "DAEMON Tools"
$executable = 'daemon410-x86.exe'
; Default category folder in startmenu.
$group = 'Recorder'

; Installation folder in Program Files.
$directory = 'Recorder\Daemon Tools'


; Run the installer.

RunWait($executable & " /S /D=" & @ProgramFilesDir & "\" & $directory,@ScriptDir)


_Desktop('DAEMON Tools.lnk')

; Delete spyware installer.
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","DaemonTools_WhenUSave_Installer")

; Kill the spyware process
If ProcessExists("DaemonTools_WhenUSave_Installer.exe") Then
ProcessClose("DaemonTools_WhenUSave_Installer.exe")
EndIf
if ProcessExists("AdVantageSetup.exe") Then
ProcessClose("AdVantageSetup.exe")
EndIf

If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then
FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe')
EndIf
If FileExists(@ProgramFilesDir & '\' & $directory & '\AdVantageSetup.exe') Then
FileDelete(@ProgramFilesDir & '\' & $directory & '\AdVantageSetup.exe')
EndIf

; Remove that... Crap
DirRemove(@ProgramFilesDir & '\' & "DaemonTools_WhenUSave_Installer",1)

DirCreate(@ProgramsCommonDir&"\"&$group )
; Move program menu folder
DirMove ( @ProgramsCommonDir&"\"&$Name, @ProgramsCommonDir&"\"&$group , 1 )


Exit


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

Link to comment
Share on other sites

Daemon Tools is no problem for me, however installing ArniWorx after it is. I used to use the AutoIt script posted here before to change Daemon Tools to non-secure mode. This doesn't work with latest AutoIt 3.2.10. I tried to convert the script to use AutoIt new user defined gui functions. However not all functionality is implemented yet, rightclicking system tray icons isn't possible yet.

I will contact author of AutoIt about this, so hopefully this will be fixed for next version of AutoIt.

BTW, Daemon Tools won't install when desktop isn't loaded. I have configured Daemon Tools to install at the latest possible state, that is the HKCU runonce section.

RunOnceEx.cmd

set current_user_run_once=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

::settings added to current user runonce section will be installed when desktop is loaded!
reg add "%current_user_run_once%" /v "Daemon Tools 4.10" /d "\"%CurrentPath%\runhidden.exe\" \"%Installpath%\Daemon Tools\^" config.cmd" /f

config.cmd

title Daemon Tools 4.10

::Install Daemon Tools 4.10 (NOTE WONT INSTALL @ T12)
daemon410-x86.exe /S

::Add uninstall information
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\dtools" /v "DisplayName" /d "Daemon Tools v4.10" /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
autoit3 config_daemontools.au3

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

exit

Note AutoIt script to automaticly configure Daemon Tools is not compatible with latest AutoIt yet. So we just have to wait for next version of AutoIt.

Edited by Acheron
Link to comment
Share on other sites

Hi Acheron,

I managed to install DT 4.10 using RunOnceEx, after a SVCPACK install of the STPD driver.

I wonder where does daemon save the user preferences (such as secure mode). Doesn't seem to be in the registry, right?

Link to comment
Share on other sites

I currently skip automatic installing of ArniWorx, because AutoIt 3.2.10 does not contain all functionality AutoItLib had. Missing functionality to actually click toolbar buttons however will be included in next beta version of AutoIt, so I just wait for it.

See also http://www.autoitscript.com/forum/index.php?showtopic=59149

Link to comment
Share on other sites

  • 3 weeks later...

Updated script to deal with 4.11.2 (removes spyware and browser window).


#cs
AutoIt 3.2 Script slightly based on an old Daemon Tools 4.0 script published at the MSFN.org boards.
Author: Guillermo Miranda Alamo
#ce

; Installer.
$Name = "DAEMON Tools Lite"
$executable = 'daemon4112-lite.exe'
; Default category folder in startmenu.
$group = 'Recorder'

; Installation folder in Program Files.
$directory = 'Recorder\Daemon Tools'


; Run the installer.

RunWait($executable & " /S /D=" & @ProgramFilesDir & "\" & $directory,@ScriptDir)


_Desktop('DAEMON Tools.lnk')

; Delete spyware installer.
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","DaemonTools_WhenUSave_Installer")

; Kill the spyware process
If ProcessExists("DaemonTools_WhenUSave_Installer.exe") Then
ProcessClose("DaemonTools_WhenUSave_Installer.exe")
EndIf
if ProcessExists("AdVantageSetup.exe") Then
ProcessClose("AdVantageSetup.exe")
EndIf

If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then
FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe')
EndIf
If FileExists(@ProgramFilesDir & '\' & $directory & '\AdVantageSetup.exe') Then
FileDelete(@ProgramFilesDir & '\' & $directory & '\AdVantageSetup.exe')
EndIf

; Remove that... Crap
DirRemove(@ProgramFilesDir & '\' & "DaemonTools_WhenUSave_Installer",1)

DirCreate(@ProgramsCommonDir&"\"&$group )
; Move program menu folder
DirMove ( @ProgramsCommonDir&"\"&$Name, @ProgramsCommonDir&"\"&$group , 1 )

#cs
A better implementation for this would be a new process that waits for the browser window.
This way, the current installation script would be over and other installations processes could go on.
#ce

; Close "activation" window if it exists
WinWait("Thank you for DAEMON Tools","",5000)
$pid = WinGetProcess("Thank you for DAEMON Tools")
If $pid >= 0 Then
ProcessClose($pid)
EndIf

Exit


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

Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
Share on other sites

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.

Edited by SyntaxError
Link to comment
Share on other sites

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

Edited by Acheron
Link to comment
Share on other sites

  • 3 weeks later...
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...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...