Jump to content

Delete File - Help


Recommended Posts

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

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

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 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

  • Moderators

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

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

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

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

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)

NEWHeader1.png

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...