Jump to content

Daemon Tools 4.08 (AutoIt Launcher)


darks0ul

Recommended Posts

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.

Link to comment
Share on other sites


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. 

Edited by radix
Link to comment
Share on other sites

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 ?

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.

Edited by squizo
Link to comment
Share on other sites

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 ?

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.

 

Link to comment
Share on other sites

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.

Edited by squizo
Link to comment
Share on other sites

  • 4 weeks later...

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

Edited by radix
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

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

Edited by microbion
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...