Help - Search - Members - Calendar
Full Version: Daemon Tools 4.08 (AutoIt Launcher)
MSFN Forums > Unattended Windows Discussion & Support > Application Installs
Pages: 1, 2

   
Google Internet Forums Unattended CD/DVD Guide
darks0ul
Hi,

I've created a script that will install last Daemon Tools and remove spyware. It is based on a script posted at this board (I'm just using one function of the base script).

You will be able to install Daemon to a subfolder of ProgramFiles (ie: ProgramFiles\Recorder\Daemon Tools), and the shortcuts can also be placed in a different subgroup (ie: Start Menu-> Programs -> Recorder -> Daemon Tools).

The most important thing that this script does is to remove the bundled spyware. It is very little code and RunOnceEx capable.

CODE
#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 = 'daemon408-x86.exe'
; Default category folder in startmenu.
$group = 'Recorder\Daemon Tools'

; 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")

If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then
   FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe')
EndIf
; Kill the spyware process
If ProcessExists("DaemonTools_WhenUSave_Installer.exe")  Then
   ProcessClose("DaemonTools_WhenUSave_Installer.exe")
EndIf
  

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

; 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


Please, post any feedback.

By the way, I haven't tried if this installs SPTD Driver 1.37. I installed it previously using the silent package from the SPTD Driver thread. I'll be keeping a look out for any updates.
Solid as a rock
So the only thing of this is to remove the spyware? 4.08 have already buildin unattended install support? Why dont use that and find a way to not install the spyware?

QUOTE
This new version supports silent setup now.
Example: daemon408-x86.exe /S /D=F:\Some Folder\
Note that no quotes must be used in installation path even if name has spaces.
All critical errros will be still displayed no matter silent or not.
Case of parameters is important, eg. /s will not work.
Reboot prompt will not be shown.

If SPTD was not present then it will be silently installed but PC will not be rebooted - it is assumed the administrator who performs unattended install will take care of reboot and restarts DT setup after reboot in this case.

It is best first to use standalone SPTD installer and install it silently this way:
sptdinst-x86.exe add /q
Note: SPTD 1.37 will not display debugger warning dialog anymore. They left this info in EULA only as this message confuses many users and also not "silent setup friendly".
Standalone SPTD 1.37 installer is released by Duplex Secure officially and can be obtained at their website http://www.duplexsecure.com Also fixed:


To prevent spyware installing:
QUOTE
"If you do not want to support us you can just delete SetupDTSB.exe after silent installation and it will never run."


BRON
darks0ul
The default installer will run "WhenUSave" spyware, if you read the script or try yourself, you'll see that it creates a new Run entry, it will be run when windows starts. However, it would be great to indicate the setup to not install ad/spyware.
Solid as a rock
QUOTE (darks0ul @ Nov 21 2006, 05:17 PM) *
The default installer will run "WhenUSave" spyware, if you read the script or try yourself, you'll see that it creates a new Run entry, it will be run when windows starts. However, it would be great to indicate the setup to not install ad/spyware.

so delete SetupDTSB.exe after silent installation and there will no "WhenU" or other spyware installed.
darks0ul
I don't know why but in my case it stills runs WhenU. Are u lucky?
MHz
Nice script biggrin.gif . I do not see WhenUSave after deleting SetupDTSB.exe. I updated my version in the AutoIt thread here. I based the script on using the SPTD within the installer. If you would like, then you can add the same concept into your script.

smile.gif
darks0ul
QUOTE (MHz @ Nov 21 2006, 11:15 PM) *
Nice script biggrin.gif . I do not see WhenUSave after deleting SetupDTSB.exe. I updated my version in the AutoIt thread here. I based the script on using the SPTD within the installer. If you would like, then you can add the same concept into your script.

smile.gif

Thanks, I'll try it biggrin.gif
s.stormont
What did I do wrong? I ran aut2exe and converted the script to dtools408.exe. I then added it to my list of programs to install in WPA. When it tries to install, I get this error:

AutoIt Error
Line 0 (File "D:\Software\Apps\Dtools\dtools408.exe"):

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

Error: Unable to execute the external program.

The system cannot find the file specified.
darks0ul
QUOTE (s.stormont @ Dec 21 2006, 08:12 AM) *
What did I do wrong? I ran aut2exe and converted the script to dtools408.exe. I then added it to my list of programs to install in WPA. When it tries to install, I get this error:

AutoIt Error
Line 0 (File "D:\Software\Apps\Dtools\dtools408.exe"):

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

Error: Unable to execute the external program.

The system cannot find the file specified.

I use RunOnceEx, have you tried running the compiled script inside Windows, without WPA?

Here's the script I'm using now:
CODE
#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 = 'daemon408-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")

If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then
   FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe')
EndIf
; Kill the spyware process
If ProcessExists("DaemonTools_WhenUSave_Installer.exe")  Then
   ProcessClose("DaemonTools_WhenUSave_Installer.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
MHz
QUOTE (darks0ul @ Dec 22 2006, 09:14 AM) *
Here's the script I'm using now:

May I suggest a small change in your execution command to help with a path issue that is possible to the installer.
CODE
; Run the installer
If Not FileExists($executable) Then FileChangeDir(@ScriptDir)
RunWait('"' & $executable & '" /S /D=' & @ProgramFilesDir & '\' & $directory, @ScriptDir)

The above will check the current directory and then change it to @ScriptDir if the file is not found. That allows you to pass a @WorkingDir <> @scriptDir and if no good, then it tries @ScriptDir. Your intial code does not correct if @WorkingDir <> @ScriptDir so you only get one chance.

smile.gif
darks0ul
QUOTE (MHz @ Dec 21 2006, 11:16 PM) *
May I suggest a small change in your execution command to help with a path issue that is possible to the installer.
CODE
; Run the installer
If Not FileExists($executable) Then FileChangeDir(@ScriptDir)
RunWait('"' & $executable & '" /S /D=' & @ProgramFilesDir & '\' & $directory, @ScriptDir)

The above will check the current directory and then change it to @ScriptDir if the file is not found. That allows you to pass a @WorkingDir <> @scriptDir and if no good, then it tries @ScriptDir. Your intial code does not correct if @WorkingDir <> @ScriptDir so you only get one chance.

smile.gif


Ehm the code works for me, because RunOnceEx launchs applications using %SystemDrive% as WorkingDir. However, I would be happy to hear if that works for WPA.
zoobooboozoo
Do I have to install AutoIt Script before I launch this or is there another way around?
darks0ul
QUOTE (zoobooboozoo @ Jan 28 2007, 10:38 AM) *
Do I have to install AutoIt Script before I launch this or is there another way around?

You can "compile" a script, so it will be an exe file, that doesn't need AutoIt.

Right clic on the AutoIt script file, and clic compile script.
prathapml
thanks, i needed this script! thumbup.gif
slimzky
edit: kinda figured >.>
sp00f
thx
Acheron
Daemon Tools 4.09 is out.

I personally use this batch script. Notice Daemon Tools lacks uninstall info, so I add it manually with adding uninst.cmd.

install.cmd
CODE
start "Install Daemon Tools" /wait "daemon409-x86.exe" /S
::delete Adware
del /f /q "%programfiles%\DAEMON Tools\SetupDTSB.exe"
::add uninstall information
set uninstallkey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Daemon Tools
copy /y uninst.cmd "%programfiles%\DAEMON Tools\uninst.cmd"
reg add "%uninstallkey%" /v "DisplayName" /d "Daemon Tools 4.09" /f
reg add "%uninstallkey%" /v "UninstallString" /d "cmd /c start \"Uninstall Daemon Tools\" /min \"%programfiles%\DAEMON Tools\uninst.cmd\"" /f
exit


uninst.cmd
CODE
start "Uninstall Daemon Tools" /min /wait "%programfiles%\Daemon Tools\uninst.exe"

:Uninstall
if not exist "%programfiles%\Daemon Tools\uninst.exe" (
     reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Daemon Tools" /va /f
     rd /s /q "%programfiles%\Daemon Tools" & exit
) else (
     goto :Uninstall
)
Acheron
Daemon Tools is nothing without a good Shell Extension.

I have created a new installer for ArniWorx Deamon Tools 1.0.60, because the normal installer is very limited.

http://updatepack.nl/custom_setup/awxDTools_1060.exe (1,04 MB)

You can use "/VERYSILENT /NORESTART" to install the program silently welcome.gif

P.S. You have to install Daemon Tools first, and awxDTools must be installed into the same dir as Daemon Tools.

You also have to install the Microsoft VC2005 Redistribubale files for the extension to work properly.
Steam Trout
I personally use original awxTools installer with /VERYSILENT /SUPPRESSMSGBOXES /NORESTART options and a custom reg file to add more supported formats. What have you added in your installer to make it less "limited" (can't possibly think of anything else it should do :\) ?
Acheron
QUOTE (Steam Trout @ Apr 15 2007, 08:40 PM) *
I personally use original awxTools installer with /VERYSILENT /SUPPRESSMSGBOXES /NORESTART options and a custom reg file to add more supported formats. What have you added in your installer to make it less "limited" (can't possibly think of anything else it should do :\) ?


I have removed the VC 2005 redist installer. I have added automatic language selection, more supported formats and removed creation of ArniWorx directory in Program Files. I have also removed all Start Menu shortcuts, since if you need to reregister stuff it's normally best to run the installer again.
ricktendo64
Im trying to make a INF addon of Daemon tools but the Installer and Uninstaller wont register correctly...

How the Hell does daemon tools register the Executables?

It says something about windows 2000 and turning off the debuger
JuMz
Does anyone know how to customize daemon tools silently? (i.e. Turn OFF autostart and turn OFF check for updates)?
darks0ul
QUOTE (JuMz @ Jun 21 2007, 01:28 PM) *
Does anyone know how to customize daemon tools silently? (i.e. Turn OFF autostart and turn OFF check for updates)?


Autostart:
CODE
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Run\DAEMON Tools


Delete this entry.
NOTS3W
QUOTE (darks0ul @ Jun 23 2007, 06:46 AM) *
QUOTE (JuMz @ Jun 21 2007, 01:28 PM) *
Does anyone know how to customize daemon tools silently? (i.e. Turn OFF autostart and turn OFF check for updates)?


Autostart:
CODE
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Run\DAEMON Tools


Delete this entry.

Thanks for pointing me in the right direction. But I don't have a Run key under HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer. I found DAEMON Tools in HKCU\Software\Microsoft\Windows\CurrentVersion\Run, deleted it and Bob's your uncle! No more autostart.

Also, if you delete %ProgramFiles%\DAEMON Tools\SetupDTSB.exe before running DAEMON Tools the first time, it won't install any When U adware.

Now, if I could just get rid of that Check for updates option.......

Ray
JuMz
Thanks for your reply. I confirmed that the 'Autostart' is now unchecked once Daemon Tools is launched. Just need to get rid of this 'Check for updates'...If anyone has any suggestions, I'm all ears...
darks0ul
QUOTE (JuMz @ Jun 25 2007, 12:48 AM) *
Thanks for your reply. I confirmed that the 'Autostart' is now unchecked once Daemon Tools is launched. Just need to get rid of this 'Check for updates'...If anyone has any suggestions, I'm all ears...

Is the autocheck new in 4.09? I'm using 4.08 and I don't see anything
0d14r3
Yeah. Begin with 4.09 and continues with 4.091.
MarkCoolio
It works if u delete "chkupd.exe" from the DAEMON Tools program directory...

Still shows "Check for updates" in the context menu then but I did not notice a single check since I installed this version 1 1/2 weeks ago.
Wesmosis
DAEMON Tools v4.10 (with SPTD v1.50) has just released
XPect
Hi,

It seem that with version 4.10, the secure mode of Daemon Tools is ON by default and block the installation of awxDTools. So we have to disable secure mode 1st to allow silent installation of awxDTools. The problem is that I haven't found any switch or tweak to disable this option.

So I've made this script to do it via autoit:
CODE
#include <A3LToolBar.au3>

Opt("WinTitleMatchMode", 4)
$hToolBar = WinGetHandle("[CLASS:Shell_TrayWnd]", "")
$hSysTray = ControlGetHandle($hToolBar, "", "ToolbarWindow321")
$BtnCnt = _Toolbar_ButtonCount($hSysTray)
$BtnTxt = "Virtual Daemon"

;Search for the right icon on the tray
$i=0
While $i < $BtnCnt - 1
if StringLeft(_Toolbar_GetButtonText($hSysTray, $i),14)=$BtnTxt Then
$BtnNum=$i
EndIf
$i=$i+1
WEnd

;Right click on the button and switch the secure mode option
_Toolbar_ClickButton($hSysTray, $BtnNum, "right")
send("O",0)
send("{Enter}",0)

Note that you need to include the A3LToolBar.au3 that can be found on the autoit site http://www.autoitscript.com/forum/index.php?showtopic=33677

Note also that you have 1st to launch DaemonTools. This means:
  1. Install Daemon Tools
  2. Run Daemon Tools
  3. Launch this script
  4. Install awxDTools
If someone get something more simple I will be very happy whistling.gif

Regards
DryKillLogic
Thanks I was looking for a solution to this problem but I find this fix a little complicated but I will try anyhow. Can you post A3LToolBar.au3, I couldnt find it :S

Thanks
XPect
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
DryKillLogic
It doesnt work :S... can you upload the exe file please?. Maybe I'm doing stg wrong.
See ya!
ZileXa
Since this topic is about installing DT using AutoIT, I realized my guide doesn't belong here. Moved it to the topic about installing DT Optimized.
darks0ul
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:
CODE

#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
Acheron
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
CODE
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
CODE
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.
darks0ul
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?
Acheron
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
darks0ul
Updated script to deal with 4.11.2 (removes spyware and browser window).

CODE

#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
kal
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
darks0ul
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.
kal
Ok, I didn't analyze the script. Hope the developper team will correct this sad.gif

Kal
SyntaxError
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.
Acheron
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
Solid as a rock
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...
Acheron
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.
radix
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. 
ricktendo64
Very smart radix... Will it also delete the adware?
radix
QUOTE (ricktendo64 @ Feb 18 2008, 06:22 AM) *
Very smart radix... Will it also delete the adware?

Yes
squizo
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.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.