Jump to content

No Way To Delete Only File Of The Folder "install"


Recommended Posts

I do unattended windows Xp with some programs, the cleanup.cmd does his work, all of the files and directories have been deleted but only one file hasnot been deleted, and i have tried many methods to delete it but always it has been there, it let me the file: C:\Install\TMPGEnc.DVD.1.6.26.73\TDA-1.6.26.73-install-EN.exe

here is my RunOnceEx of the file:

REG ADD %KEY%\015 /VE /D "Tmpgenc DVDAuthor 1.6.26.73" /f

REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Tmpgenc.DVD.1.6.26.73\SetupDVDAuthor-1.6.26.73.exe" /f

REG ADD %KEY%\015 /V 2 /D "%systemdrive%\install\Tmpgenc.DVD.1.6.26.73\RegisterDVDAuthor.exe" /f

REG ADD %KEY%\015 /V 3 /D "REGEDIT /S %systemdrive%\install\Tmpgenc.DVD.1.6.26.73\DVDAuthor.reg" /f

Here is my cleanup.cmd of the part concerning the file

RD /S /Q "%systemdrive%\install\"

Any Suggestions Please??

Link to comment
Share on other sites


Download small program handle from sysinternals... Then just from cmd use command

handle TDA-1.6.26.73-install-EN.exe

Then U will see which process is holding that file.

Then U just need to include command

wmic process where name="process.exe" call terminate

, where process.exe is name of the process holding that file

Link to comment
Share on other sites

Here A VBS Script That Will Remove Any Folder

    Dim Shell, SD, fso
  V = Vbcrlf
 on error resume next
 Set Shell = WScript.CreateObject("WScript.Shell")
 Set fso = CreateObject("Scripting.FileSystemObject")
 SD = Shell.ExpandEnvironmentStrings("%SystemDrive%")
 fso.DeleteFolder( SD & "\Install")
shell.popup "Clean Up Completed", 3, "Remove Install Folder", 0+32

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
  • Recently Browsing   0 members

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