troubleshooting Question

PendingFileRenameOperations Batch file help need it in order to work

Avatar of Claudio Herrera
Claudio HerreraFlag for Mexico asked on
ProgrammingWindows XPWindows OSWindows Batch
5 Comments1 Solution2347 ViewsLast Modified:
Dear Experts

I found this batch file and I wanted to work under Win XP SP3,

I need a batch file to delete protect files by windows or when the file it is being used by another person or progam the only way to do this is after restart

For testing purposes I will use the following path
C:\Documents and Settings\Rebelscum\Desktop\test.txt

Not using

del "%userprofile%\desktop\test.txt" OR

del "%userprofile%\..\Rebelscum\desktop\test.txt

You may understand me what i want if you read the following thread

http://www.pcreview.co.uk/forums/pendingfilerenameoperations-delete-file-t1715654.html

Thank you very much for any help you can provide me

Rebel

:: Critical conditions for this script to run as intended:
:: - to be run by someone with administrator privileges.
:: Non-critical conditions for this script to run as intended:
:: - to be run on win7 or above ( timeout )
::
@echo off
set RenEngKeyPath=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
set $rnd=%random%%random%

:: reg add "%RenEngKeyPath%" /f /v "AllowProtectedRenames" /t REG_SZ /d 1 >nul
:: reg add "%RenEngKeyPath%" /f /v "PendingFileRenameOperations" /t REG_MULTI_SZ /d

"
\??\%systemroot%\system32\credui.dll
!\??\%systemroot%\system32\%$rnd%.dll

\??\%systemroot%\explorer.exe
!\??\%systemroot%\%$rnd%.dll
"
>nul

echo
timeout 1 >nul
:: shutdown /s /t 0
ASKER CERTIFIED SOLUTION
Sudeep Sharma
Technical Designer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros