darks0ul Posted November 20, 2006 Share Posted November 20, 2006 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.#csAutoIt 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 processIf ProcessExists("DaemonTools_WhenUSave_Installer.exe") Then ProcessClose("DaemonTools_WhenUSave_Installer.exe")EndIf; Remove that... CrapDirRemove(@ProgramFilesDir & '\' & "DaemonTools_WhenUSave_Installer",1); Move program menu folderDirMove ( @ProgramsCommonDir&"\"&$Name, @ProgramsCommonDir&"\"&$group , 1 )ExitFunc _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) EndIfEndFuncPlease, 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. Link to comment Share on other sites More sharing options...
Solid as a rock Posted November 21, 2006 Share Posted November 21, 2006 (edited) 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?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 /qNote: 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:"If you do not want to support us you can just delete SetupDTSB.exe after silent installation and it will never run."BRON Edited November 21, 2006 by Solid as a rock Link to comment Share on other sites More sharing options...
darks0ul Posted November 21, 2006 Author Share Posted November 21, 2006 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. Link to comment Share on other sites More sharing options...
Solid as a rock Posted November 21, 2006 Share Posted November 21, 2006 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. Link to comment Share on other sites More sharing options...
darks0ul Posted November 21, 2006 Author Share Posted November 21, 2006 I don't know why but in my case it stills runs WhenU. Are u lucky? Link to comment Share on other sites More sharing options...
MHz Posted November 22, 2006 Share Posted November 22, 2006 Nice script . 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. Link to comment Share on other sites More sharing options...
darks0ul Posted November 22, 2006 Author Share Posted November 22, 2006 Nice script . 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.Thanks, I'll try it Link to comment Share on other sites More sharing options...
s.stormont Posted December 21, 2006 Share Posted December 21, 2006 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 ErrorLine 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. Link to comment Share on other sites More sharing options...
darks0ul Posted December 21, 2006 Author Share Posted December 21, 2006 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 ErrorLine 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:#csAutoIt 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 processIf ProcessExists("DaemonTools_WhenUSave_Installer.exe") Then ProcessClose("DaemonTools_WhenUSave_Installer.exe")EndIf; Remove that... CrapDirRemove(@ProgramFilesDir & '\' & "DaemonTools_WhenUSave_Installer",1)DirCreate(@ProgramsCommonDir&"\"&$group ); Move program menu folderDirMove ( @ProgramsCommonDir&"\"&$Name, @ProgramsCommonDir&"\"&$group , 1 )ExitFunc _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) EndIfEndFunc Link to comment Share on other sites More sharing options...
MHz Posted December 22, 2006 Share Posted December 22, 2006 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.; Run the installerIf 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. Link to comment Share on other sites More sharing options...
darks0ul Posted December 22, 2006 Author Share Posted December 22, 2006 May I suggest a small change in your execution command to help with a path issue that is possible to the installer.; Run the installerIf 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.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. Link to comment Share on other sites More sharing options...
zoobooboozoo Posted January 28, 2007 Share Posted January 28, 2007 Do I have to install AutoIt Script before I launch this or is there another way around? Link to comment Share on other sites More sharing options...
darks0ul Posted January 28, 2007 Author Share Posted January 28, 2007 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. Link to comment Share on other sites More sharing options...
prathapml Posted January 28, 2007 Share Posted January 28, 2007 thanks, i needed this script! Link to comment Share on other sites More sharing options...
slimzky Posted January 29, 2007 Share Posted January 29, 2007 (edited) edit: kinda figured >.> Edited January 29, 2007 by slimzky Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now