Jump to content

Daemon Tools 4.03 how to install it?


Recommended Posts


I posted a 4.03 script yesterday (my time). Just some window title changes were needed to make it work with the newer version. Give it a try and see how it goes. It seems to working OK by my tests. The installation routine of 4.03 is the same as 4.00, so easier, silent methods are still not available.

To AutoIt Thread

Edit: Added link.

Edited by MHz
Link to comment
Share on other sites

I posted a 4.03 script yesterday (my time). Just some window title changes were needed to make it work with the newer version. Give it a try and see how it goes. It seems to working OK by my tests. The installation routine of 4.03 is the same as 4.00, so easier, silent methods are still not available.

To AutoIt Thread

Edit: Added link.

Ok, thanks... i will give a new try to this. :thumbup

edit: i am unsure the difference between both Au3? Am i right if i use my own method to reboot i have to use the second Au3?

Edited by SolidasRock
Link to comment
Share on other sites

why is that autoitscript so complex? i've had complicated autoit scritps with gui and all that are shorter then that install script.

Well, I guess you have not experienced a real big, complex script then? A program can go into thousands of lines of code and become very complex (yes, even an Au3). I have not even touched on using any of the more complex concepts like using multi dimenitional arrays, DllCalls and the rest. Your evaluation of the word complex is only what you rate as, not of someone who does trivial things that you might rate as complex? A script such as this takes about 10 minutes or so to make with CMenu to create the template. For the basic actions performed, perhaps created quicker then you can create for the same task. Testing and fine tuning is what can use up time with creating these scripts. I did have to manage a reboot so extra time was needed with managing a solution.

Note: CMenu is 2858 lines of code with multiple Gui's. So what is the realistic base of size comparison of install script to a Gui? :huh:

Let's see what is so complex.

Script variable settings for the user. (comments make this section bulky but informative)

Opt('TrayIconDebug', 1)

; Installer.
$executable = 'daemon403-x86.exe'
; Show progess.
$splash = 0
; Default catagory folder in startmenu.
$group = 'DAEMON Tools'
; New catagory to move the default folder into.
$catagory = ''
; Installation folder in Program Files.
$directory = 'DAEMON Tools'
; Allowed time for installation.
$allowed = 300 * 1000
; Auto or manual reboot. (either choice will runonce the installer at next reboot)
$auto_reboot = 0

Run installer and process windows. (largest part of script (with good spacing) which covers possibilites to successfully install DT4)

; Main Window Title
$title = 'DAEMON Tools 4.03HE'
; Run the installer.
If $auto_reboot And StringInStr($cmdlineraw, '/postrun') Then
If WinWait($title, 'Welcome to the DAEMON Tools', 30) Then
$pid = $executable
Else
$pid = _Install()
EndIf
Else
$pid = _Install()
EndIf

$time = TimerInit()
Do
Select; 1st 3 windows are messageboxes.
Case WinExists('SPTD setup V1.24', 'This program will install SCSI Pass Through Direct')
ControlClick('SPTD setup V1.24', 'This program will install SCSI Pass Through Direct', 'Button1')
Sleep(1000)

Case WinExists($title, 'Setup must restart Windows')
_RunOnce()
If $auto_reboot Then
$choice = 'Button1'
Else
$choice = 'Button2'
EndIf
ControlClick($title, 'Setup must restart Windows', $choice)
WinWaitClose($title, 'Setup must restart Windows', 5)
Exit

Case WinExists($title, 'You must reboot after previous operation')
_RunOnce()
ControlClick($title, 'You must reboot after previous operation', 'Button1')
; Desktop Reboot after 20 seconds.
Sleep(15*1000)
MsgBox(262144, $title, 'System restart commencing now', 5)
Shutdown(2)
Exit

Case WinExists($title, 'Welcome to the DAEMON Tools')
ControlClick($title, 'Welcome to the DAEMON Tools', 'Button2')

Case WinExists($title, 'License Agreement')
ControlClick($title, 'License Agreement', 'Button2')

Case WinExists($title, 'Already Installed')
$text = 'Update the automated installation script for uninstall or upgrade support, If required'
MsgBox(262144, $title, $text, 5)
_Abort()

Case WinExists($title, 'Choose Components')
ControlFocus($title, 'Choose Components', 'SysTreeView321')
ControlSend($title, 'Choose Components', 'SysTreeView321', '{DOWN}{SPACE}')
ControlClick($title, 'Choose Components', 'Button2')

Case WinExists($title, 'Choose the folder')
ControlSend($title, 'Choose the folder', 'Edit1', @ProgramFilesDir & '\' & $directory)
ControlClick($title, 'Choose the folder', 'Button2')

Case WinExists($title, 'Completing the DAEMON Tools')
ControlCommand($title, 'Completing the DAEMON Tools', 'Button4', 'UnCheck', '')
ControlClick($title, 'Completing the DAEMON Tools', 'Button2')
ExitLoop
EndSelect
Sleep(1000)
If TimerDiff($time) > $allowed Then _Abort()
Until Not ProcessExists($pid)

Remove Shortcuts for user. (Working Directory changes by _MainShortcut() function as why the user can easily use relative addressing).

_Destop() and _Quicklaunch() functions change working directory also when used for ease.

If _MainShortcut('DAEMON Tools.lnk') Then
FileDelete('Uninstall.lnk')
_Desktop('DAEMON Tools.lnk')
EndIf

Delete spyware installer (if exists only)

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

Optional, Remove Autorun entry for user

;~ RegDelete('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'DAEMON Tools')

The script will run until it reaches the Exit in the script. All the generic functions (used in all of my install scripts) below the Exit do the work, to make the above script easier to create and run.

Do notice in the whole of the DT4 script of no includes being used. All of the functions could goto an include script which can be used with the rest of my install scripts, which make my script much smaller to browse as to just the code displayed above.

Creating Gui's is easy, it is creating the script that does the work is when the real challenge starts. :rolleyes:

Perhaps you have a better solution to automating Daemon Tool's 4 to share for us ? :w00t:

Link to comment
Share on other sites

403 scrip doesnt work .. it hangs during setup

From my 4.00 AutoIt (which MHZ have write too) experience, it looks like hung but after 30 seconds (???) it go further... i guess it is the same as 4.03 :)

I seen a hang of up to about 5 seconds, but 30 is abit much. Too save too many messages being sent to window which may confuse it, I have added some timed WinWaits. This means the window hung, will not receive another click for up to 15 seconds. This should indeed help your issue.

4.00 doesnt hang at my end , only 403

I would expect the installers to behave the same and my tests show same behaviour. Thanks for the posted picture. I see annuleren on a button but hopefully the ClassnameNN's used should manage the language difference OK.

Oh, bujo696, a good edit of the script. ;)

To AutoIt Thread

Link to comment
Share on other sites

I went to the web page for the company that makes the pass through driver to see what I could find there which might be helpful to our cause. Holy cow, talk about a nothing of a web site. You can hardly even tell what line of business they're in.

@Swimming_bird, generally speaking a script, be it AutoIt or any other scripting language, can be very simple or very complex "looking". A lot of times, scripts that appear long in print just have a lot of error checking in them so they can appropriately react to as many different scenarios as possible. The error checking code, depending on what it needs to do can indeed be complex or simply very long. Depends on the situation.

Link to comment
Share on other sites

Well, I consider that installing this SPTD from Cmdlines.txt will make installation smoother. Anyone up to test?

Instructions:

When you go through installation of DT4, the SPTD messagebox pops up. Just copy the SPTDinst.exe from the temp directory and place it in the same directory as Cmdlines.txt. Cancel the install, if wish. Then add the following script next to Cmdlines.txt for execution at T12.

_SPTDinst.html

Now that SPTD is installed, at T0, the OS will reboot into RunOnceEx and will execute the following script which will install DT4. That should be it, nothing further to do.

_Daemon_Tools_v4.03.html

SPTDinst.exe is an extra 800 kb to your UA, but it could be worth it. :)

DT4 will install completely, 1st time.

Should be no 2nd reboot for DT4 after the RunOnceEx install. :yes:

Edit: small script change.

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