How to? Make file accessible

May 20, 2008
3,520
3
Elkridge, MD, USA
In my C:\TMP directory (which %TMP references) there is a copy of a desktop shortcut file (.LNK) to access control panel's "date and time" feature. This file is marked read-only, and the contents are inaccessible, both from TCC and from Windows Explorer. Changing to read-write does not work, neither from Windows Explorer nor from TCC. The condition has survived several system power off / restart cycles. How can I delete it? BTW, its presence prevents deleting the directory, too.
 
May 20, 2008
3,520
3
Elkridge, MD, USA
This is XP, and I am an administrator, so elevation is inapplicable, and I already have all the rights necessary to delete anyone's files. DEL/B did not help; the only way another process could hog the file if it is done through the registry. The only user-started programs running are Outlook Express, Firefox, and the single instance of TCC where I tried DEL /B. Used TCC's REBOOT/R command; file is still there...
 

samintz

Scott Mintz
May 20, 2008
1,322
12
Solon, OH, USA
Steve, download a copy of PsExec from SysInternals. That will allow you to run an application as the System user. System usually can delete stuff that other users cannot.

I've used psexec to run regedit as the system user. That allows access to the Security and SAM keys which are otherwise inaccessible.

Code:
psexec -s -i tcc.exe
 
May 20, 2008
9,144
58
Syracuse, NY, USA
Have you tried using ProcessExplorer to determine if another process has the file open? Who owns the file? Do you get an error message when trying to delete it ... which one?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,766
47
Albuquerque, NM
prospero.unm.edu
Another option is to boot another copy of WinXP and use it to delete the file. Check out the DaRT application from Microsoft. (Diagnostics and Recovery Toolset).
For that matter, TCC and TCC/LE work reasonably well under Windows PE and BartPE. (Some features don't work, most notably the help system, which requires Internet Explorer. But all of the file-management stuff works fine in PE.)