Jump to content

daemon tools lite


narillo
 Share

Recommended Posts

hi guys... i need your help please... i'm try to use this script to automate daemont tools 4.30.1 and remove the daemon tool bar, etc... but it doesn't work properly... what i'm doing wrong?? thanks a million in advance for your help guys..

#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 = 'daemon4301.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
Link to comment
Share on other sites

Welcome to the forum.

I don't have Daemon Tools and I don't have any need for it, so the help I'll be able to give you will be under these conditions.

Your _Desktop function looks a little weird to me - especially "Return" statements.

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

"Return" statement is used usually to pass something back OR to force a return before the function execution comes to a natural end.

In your case "Return" is not justified.

Your function should be:

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

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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
 Share

  • Recently Browsing   0 members

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