Ayres Posted April 6, 2006 Share Posted April 6, 2006 I do not obtain to erase this archive with the following code, but I erases it manually. $file=@ProgramFilesDir & "\google\GoogleToolbar1.dll" If FileExists($file) Then FileDelete($file) EndIf Link to comment Share on other sites More sharing options...
SpookMeister Posted April 6, 2006 Share Posted April 6, 2006 Verify your path $file = @ProgramFilesDir & "\google\GoogleToolbar1.dll" If FileExists($file) Then ;FileDelete($file) MsgBox(0, "It is there", $file) EndIf [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Ayres Posted April 6, 2006 Author Share Posted April 6, 2006 The path is correct and I already verified it including a msgbox in the code. Link to comment Share on other sites More sharing options...
Ayres Posted April 6, 2006 Author Share Posted April 6, 2006 I obtain to renomear the archive with the command I MOVE, but I do not obtain erases it with command FILEDELETE. Why it will be? Link to comment Share on other sites More sharing options...
SpookMeister Posted April 6, 2006 Share Posted April 6, 2006 (edited) Can you do a move? $file = @ProgramFilesDir & "\google\GoogleToolbar1.dll" $file2 = @ProgramFilesDir & "\google\GoogleToolbar1_new.dll" If FileExists($file) Then FileMove($file,$file2) EndIf ahh, you are thinking like me... hrm Edited April 6, 2006 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 6, 2006 Moderators Share Posted April 6, 2006 If the file is being used, then you won't be able to delete it that way. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
SpookMeister Posted April 6, 2006 Share Posted April 6, 2006 I have never had this problem before. Things I would try: Can you FileDelete the new file (after the move) Have you tried FileRecycle? [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
forger Posted April 6, 2006 Share Posted April 6, 2006 (edited) maybe it's a registered dll: RunWait("regsvr32 /u /s " & Chr(34) & $file & Chr(34)) or you have to kill iexplore.exe or rundll32.exe Edited April 6, 2006 by forger Link to comment Share on other sites More sharing options...
Ayres Posted April 6, 2006 Author Share Posted April 6, 2006 The program obtains to rename the file to TESTE.DLL, but it does not obtain exactly erases it with the new name also. $file=@ProgramFilesDir & "\google\GoogleToolbar1.dll" If FileExists($file) Then msgbox(0,$i,"Existe") FileMove($file,@ProgramFilesDir & "\google\Teste.txt") FileDelete(@ProgramFilesDir & "\google\Teste.txt") EndIf Link to comment Share on other sites More sharing options...
Confuzzled Posted April 8, 2006 Share Posted April 8, 2006 Have you considered uninstalling the Google Toolbar software, rather than just deleting one of the components? This way you get to clean up the registry and related files properly, rather than make your system unstable.(You may find that file is set to be memory resident on startup) Link to comment Share on other sites More sharing options...
Valuater Posted April 8, 2006 Share Posted April 8, 2006 from *XPClean Menu* $PID = Run(@ComSpec & " /C START msconfig.exe @5", "", @SW_HIDE) If @error Then MsgBox(64, "Sorry! ", "This Windows Xp Program was not found ", 8) EndIf Sleep(1500) $iMsgBoxAnswer = MsgBox(0, "SYSTEM Start-Up *Memory Resident* CheckBox Options", "Please TAB over to *Start up* " & @CRLF & "(Hint - This is where most SYSTEM Start-up Programs are located) " & @CRLF & "" & @CRLF & "Un-Check Boxes of Programs *you recognize* and Do Not want to run at Start-up" & @CRLF & "" & @CRLF & "You can re-check those boxes later, if you wish... Use Some CAUTION HERE! ", 22) WinWaitClose("System Configuration Utility", "", 90) 8) 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