Announcement

Collapse
No announcement yet.

Silent Installation switches for DT 4.06

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Silent Installation switches for DT 4.06

    Hi,
    as I can't find out about the silent install switches for the DT installer I wanted to ask about it here. I'm currently integrating a bunch of free programs into WPI (windows post installation) and all those programs should of course work silently.

    Are there switches for silent install, and are there also some to prevent the adware to be automatically installed on my computer? Or do I have to use scripting (e.g. with AutoIt3) in order to install DT 4.06 silently?

    Any answer is appreciated.

  • #2
    Silent installation switches are not supported.
    Everybody be cool! You, be cool!
    They'll keep fighting! And they'll win!

    Comment


    • #3
      You could use /S which is common for the Nullsoft installer. However, that will only silently install DTools itself, not SPTD. You'll need to install it seperately first.

      Comment


      • #4
        Where can I get the newest version of SPTD? And does it support silent switches, and should DT see that there's an existing version of SPTD when I start its installation afterwards?

        Comment


        • #5
          You can get the latest SPTD in the download section or here:
          Heaven Can Wait -- My Band-Page

          Comment


          • #6
            Mh, seems like the SPTD installer doesn't have any silent installation switch...

            I've found something interesting over at the MSFN forums.. The user named maxximum, which I give fuull credit for this, has posted a script for AutoIt3 there which handles the full install, including reboot, of DT 4.06HE. You just need to make the settings in there, compile it and get a fully working .exe file for a not so silent, but at least automatic install.

            Code:
            #region - Daemon Tools v4.06HE install script - (Automated with WinExists functions)
            
            Opt('TrayIconDebug', 1)
            
            ; Installer.
            $executable = 'daemon406-x86.exe'
            
            ; Show progess.
            $splash = 0
            
            ; Default catagory folder in startmenu.
            $group = 'Burning software'
            
            ; New catagory to move the default folder into.
            $catagory = ''
            
            ; Installation folder in Program Files.
            ; $directory = 'DAEMON Tools'
            $directory = 'Daemon Tools'
            
            ; Allowed time for installation.
            $allowed = 300 * 1000
            
            ; The next setting should be 0 unless you want to reboot imediately.
            ; Auto or manual reboot. (either choice will runonce the installer at next reboot).
            $auto_reboot = 0
            
            ; The next setting is not used if $auto_reboot = 1.
            ; Desktop Reboot. (Set to 1 if you want the script to handle the reboot into the 2nd part of install)
            $desktop_reboot = 0
            
            ; ** README ""
            ; Check values above and "Remove shortcuts" section below are correct.
            ; This is a 2 part install. The 2nd part automatically happens on reboot at HKCU\RunOnce
            ;   which is when the Startup folder is processed and the Desktop is active. This script
            ;   is set to manage both parts of installation automagically.
            ; Spyware is unchecked for installation.;)
            
            ; Main Window Titles.
            $title_dtools = 'DAEMON Tools 4.06HE'
            $title_sptd   = 'SPTD setup V1.29'
            
            ; Run the installer.
            If $auto_reboot And StringInStr($cmdlineraw, '/postrun') Then
                If WinWait($title_dtools, '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($title_sptd, 'This program will install SCSI Pass Through Direct')
                        Sleep(1000)
                        ControlClick($title_sptd, 'This program will install SCSI Pass Through Direct', 'Button1')
                        WinWaitClose($title_sptd, 'This program will install SCSI Pass Through Direct', 10)
                        WinWait($title_dtools, 'Setup must restart Windows', 5)
            
                    Case WinExists($title_dtools, 'Setup must restart Windows')
                        _RunOnce()
                        If $auto_reboot Then
                            $choice = 'Button1'
                        Else
                            $choice = 'Button2'
                        EndIf
                        ControlClick($title_dtools, 'Setup must restart Windows', $choice)
                        WinWaitClose($title_dtools, 'Setup must restart Windows', 5)
                        Exit
            
                    Case WinExists($title_dtools, 'You must reboot after previous operation')
                        _RunOnce()
                        ControlClick($title_dtools, 'You must reboot after previous operation', 'Button1')
                       ; Desktop Reboot after 20 seconds if set above.
                        If $desktop_reboot Then
                            Sleep(15*1000)
                            MsgBox(262144, $title_dtools, 'System restart commencing now', 5)
                            Shutdown(2)
                        EndIf
                        Exit
            
                    Case WinExists($title_dtools, 'Welcome to the DAEMON Tools')
                        ControlClick($title_dtools, 'Welcome to the DAEMON Tools', 'Button2')
            
                    Case WinExists($title_dtools, 'License Agreement')
                        If WinWait($title_sptd, 'This program will install SCSI Pass Through Direct', 2) Then
                            ContinueLoop
                        EndIf
                        ControlClick($title_dtools, 'License Agreement', 'Button2')
                      
                    Case WinExists($title_dtools, 'Already Installed')
                        $text = 'Update the automated installation script for uninstall or upgrade support'
                        MsgBox(262144, $title_dtools, $text, 5)
                        _Abort()
            
                    Case WinExists($title_dtools, 'Choose Components')
                        ControlFocus($title_dtools, 'Choose Components', 'SysTreeView321')
                        ControlSend($title_dtools, 'Choose Components', 'SysTreeView321', '{DOWN}{SPACE}')
                        ControlClick($title_dtools, 'Choose Components', 'Button2')
            
                    Case WinExists($title_dtools, 'Choose Install Location')
                        ControlSend($title_dtools, 'Choose Install Location', 'Edit1', @ProgramFilesDir & '\' & $directory)
                        ControlClick($title_dtools, 'Choose Install Location', 'Button2')
            
                    Case WinExists($title_dtools, 'Completing the DAEMON Tools')
                        ControlCommand($title_dtools, 'Completing the DAEMON Tools', 'Button4', 'UnCheck', '')
                        ControlClick($title_dtools, 'Completing the DAEMON Tools', 'Button2')
                        ExitLoop
                EndSelect
                Sleep(1000)
                If TimerDiff($time) > $allowed Then _Abort()
            Until Not ProcessExists($pid)
            
            ; Remove shortcuts.
            If _MainShortcut('DAEMON Tools.lnk') Then
                FileDelete('Uninstall.lnk')
                _Desktop('DAEMON Tools.lnk')
            EndIf
            
            ; Delete spyware installer.
            If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then
                FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe')
            EndIf
            
            ; Remove Autorun entry.
            RegDelete('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'DAEMON Tools')
            
            #endregion
            
            Exit
            
            Func _Install($path = 'Default')
               ; Run the installer in Default Script directory.
                Dim $splash, $processblock
                If $path = 'Default' Then $path = @ScriptDir
                If StringRight($path, 1) <> '\' Then $path = $path & '\'
                If StringInStr($executable, '\') Then $path = ''
                If Not FileExists($path & $executable) Then Exit(1)
                If $processblock <> '' Then Call('_' & 'ProcessBlock')
                If $splash Then _Splash('Installing:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))
                If StringRight($executable, 3) = 'msi' Then
                    Return Run(@SystemDir & '\msiexec /i "' & $path & $executable & '"')
                Else
                    Return Run($path & $executable)
                EndIf
            EndFunc
            
            Func _Abort()
               ; close process if exists then exit.
                Dim $pid
                If ProcessExists($pid) Then
                    ProcessClose($pid)
                    Exit(2)
                Else
                    Exit(3)
                EndIf
            EndFunc
            
            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
            
            Func _MainShortcut($shortcut, $rename = '')
               ; Change working directory to correct StartMenu\Group directory.
                Dim $group, $catagory, $splash
                If $group = '' Then Return 0
                If FileExists(@ProgramsDir & '\' & $group) Then
                    FileChangeDir(@ProgramsDir & '\' & $group)
                ElseIf FileExists(@ProgramsCommonDir & '\' & $group) Then
                    FileChangeDir(@ProgramsCommonDir & '\' & $group)
                Else
                    Return 0
                EndIf
               ; Wait for main shortcut.
                If $splash Then _Splash('Waiting for shortcuts')
                For $i = 1 To 20
                    If FileExists($shortcut) Then ExitLoop
                    Sleep(500)
                Next
                If $splash Then _Splash('Cleaning up:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))
               ; If catagory not assigned anything, then return.
                If $catagory = '' Then Return 1
               ; Move the group folder into the catagory folder.
                If FileChangeDir('..') And DirCopy($group, $catagory & '\' & $group, 1) Then
                    If DirRemove($group, 1) Then
                       ; If optional rename parameter is used, then rename the group folder.
                        If $rename <> '' And FileChangeDir($catagory) Then
                            If DirCopy($group, $rename, 1) And DirRemove($group, 1) Then
                                Return FileChangeDir($rename)
                            EndIf
                        Else
                            Return FileChangeDir($catagory & '\' & $group)
                        EndIf
                    EndIf
                EndIf
            EndFunc
            
            Func _QuickLaunch($shortcut)
               ; Delete a Quicklaunch shortcut.
                Local $subdirs = '\Microsoft\Internet Explorer\Quick Launch'
                If FileExists(@AppDataDir & $subdirs & '\' & $shortcut) Then
                    Return FileChangeDir(@AppDataDir & $subdirs) And FileDelete($shortcut)
                ElseIf FileExists(@AppDataCommonDir & $subdirs & '\' & $shortcut) Then
                    Return FileChangeDir(@AppDataCommonDir & $subdirs) And FileDelete($shortcut)
                EndIf
            EndFunc
            
            Func _Splash($text = '')
               ; Shows a small borderless splash message.
                Dim $splash
                If $splash Then
                    If $text Then
                        SplashTextOn('', $text, 500, 25, -1, 5, 1, '', 14)
                    Else
                        SplashOff()
                    EndIf
                EndIf
            EndFunc
            
            Func _WinClose($title, $text = '')
               ; Close a window with further attempts.
                For $i = 1 To 10
                    WinClose($title, $text)
                    If Not WinExists($title) Then Return 1
                    Sleep(500)
                Next
            EndFunc
            
            Func OnAutoItStart()
               ; A 2nd script instance will exit.
                Local $interpreter
                If StringInStr($cmdlineraw, '/dummy') Then Exit
                $interpreter = StringTrimRight(@ScriptName, 4) & ' Script Interpreter'
                If WinExists($interpreter) Then Exit
                AutoItWinSetTitle($interpreter)
            EndFunc
            
            Func _RunOnce()
               ; Add 2nd part to installation.
                Local $key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce'
                If @Compiled Then
                    RegWrite($key, '_DTools', 'Reg_sz', '"' & @ScriptFullPath & '" /postrun')
                Else
                    RegWrite($key, '_DTools', 'Reg_sz', '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /postrun')
                EndIf
            EndFunc

            Comment


            • #7
              beginning from DT 4.08 there IS silent installation option.
              Please see:

              ---
              - DAEMON Tools V4.0.8 RELEASED!
              Dear Community,
              we're proud to release a new DaemonTools version, V4.0.8
              This version also includes a new SPTD (V1.37)
              Changelog:
              This new version supports silent setup now.
              Example: daemon408-x86.exe /S /D=F:\Some Folder\
              ---

              Comment

              Working...
              X