1

Background (skip if TLDR):

I installed via the internet (possibly shady) download Command & Conquer The Last Decade -- I OWN the originals but have no cd drive, meaning I have the serials and everything. I performed a few virus scans and all appeared good. After discovering that some of the old Windows 95/98 games didn't run well on Windows 10, I decided to install a fan patch that should fix it from a trusted website -- This didn't work either. So I decided to uninstall everything. The uninstall for the possibly-shady-internet-download was successful, but the patch files seemed to remain and there was no entry in either of windows-10's add-remove-program (main & Control Panel). When I tried to manually delete the files it deleted everything except for 2 font files .ttf's and all the folder-heirarchy's above it.

Problem: I successully deleted one of two of the font files but constantly got the same message / popup on both of them on all my attempts.

Attempts: Searched Google, and open first 20 tabs and do everything! (keep in mind my user-acct is marked as an admin)

  • My Windows Security setting for Ransomeware protection already has "controlled folder access" marked as off.
  • I tried cipher '/u /n /h > %UserProfile%\Desktop\MyEncryptedFiles.txt & looking under the properties of the files to see if they were encrypted -- both the output file and the properties said the files were NOT encrypted .
  • Right-Click and delete. (fail; I received a popup saying the file was in use)
  • Opening the windows-10 resource manager and searching for the folder the .ttf's were located in and closing out the process that was using the files explorer.exe than attempting to delete via windows-file-manager, and then via admin-cmd-prompt.
  • I attempted via cmd prompt the takeown cmd on the files -- it was a success! Upon viewing the file properties, security, advanced ... it does indeed say I am the owner.enter image description here
  • I attempted all the cmd-prompt del modifiers such as /s /f, etc. I tried a few commands for deleting directories and their modifiers such as rd
  • I attempted to rename the 2 files followed by the deletion of all previous methods listed. Rename (success), Deletion (failure)
  • I attempted to move the 2 files to the desktop and to delete the directory they were previously in (success!), followed by attempting to delete the files I renamed (failure) ((hence fourth APM ; means all previous methods))
  • I restarted the computer and tried APM
  • I looked a the Window-10 backups and saw there was one lonely entry that listed "Command & Conquer the last decade" & the correct install date. It didn't seem to have any effect on all the changes I'd made and it remained uninstalled except for the 2 renamed font files on my desktop. (update, I saw restore that pre-dated this, and performed that restore -- the text file is still on my desktop and un-deletable.)
  • I downloaded the free version of CCleaner and marked the 2 font files as things to be deleted on the next "sweep" -- then performed a manual sweep. This failed.
  • I attempted to find the font files via reg-edit as suggested by "Can't delete Font files" superuser question method -- there were no entries for the offending fonts.
  • I unlocked the "secret admin account" via admin-cmd-prompt via net user administrator /active:yes Upon switching to that account for some reason I was able to successfully delete one of the 2 font files. The remaining file gives me a popup now that no longer says it is in use, instead it saysenter image description here
  • I tried safety-mode followed by APM -- and alas it gave me the same popup about permissions.

Outside of that, I am out of ideas on how to delete the remaining file. The popup above lists the name of the laptop itself LAPTOP-LTTT2E6D followed by a \username (me). But I get no windows popup asking me to put in my credentials.

  • DId I miss the part where you took ownership & granted yourself full control??? – Keith Miller Jan 7 at 17:07
  • I see you did takeown, but no mention of granting yourself fulll control (two different things!). Properties > Security > Advanced. POst a screenshot. – Keith Miller Jan 7 at 17:11
  • @KeithMiller I included a picture. The highlighted line is me. It says full control. – Xzila Jan 7 at 18:25
2
+50

It appears that you cannot modify the file due to Windows permissions.
There is a popular "Take Ownership" command that usually works:

takeown /f file
icacls filename /grant administrators:F

You can also try taking ownership of the folder that the file is in:

takeown /f foldername /r /d y
icacls foldername /grant administrators:F /t

Make sure you run these commands as Administrator, right click the command prompt program and click "Run as administrator". Or, press Windows+R to open the “Run” box. Type “cmd” into the box and then press Ctrl+Shift+Enter.

Sources:
https://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/
https://www.askvg.com/add-take-ownership-option-in-file-folder-context-menu-in-windows-vista/
https://www.tenforums.com/tutorials/3587-change-owner-file-folder-drive-registry-key-windows-10-a.html

  • 1
    wtf --- I am certain i did this. I did it in cmd prompt as administrator. I even looked it up in all the various dialogues cmd, powershell, properties-security. And they all confirmed ownership and full control. Not sure what I did wrong. but after explicitly running command icacls filename /grant administrators:F this time it allowed me to delete. SUCCESS! Thank you!! ( stackexchange says I can't award +50 for 20hrs) – Xzila Jan 7 at 19:18
1

That pop-up generally means that the file is locked by a process or in-use like you've seen, so I would focus on making sure it's not in use before your other steps. Fonts are often naughty like this. These are mostly steps you've tried, but are a bit more specific:

  1. If it's in use by explorer.exe, then try closing out explorer.exe (you should see your taskbar and a few other things go missing and stay missing. In windows 10, killing the process through task manager just restarts it automatically as well as some other services. You will have to be careful it does not restart automatically). Then delete the file using cmd.

  2. The process using the font may only start from your profile, seeing that it's running as you laptop\you and not system - this is also why the secret admin account could delete one. If killing explorer doesn't solve your issue, you may try creating a new local user account on your PC, and deleting the file while logged in as that user (make sure you fully logout of your existing user as those processes will keep running otherwise). You may need to take control of the file again (or give control using your main user). Then note what user the error message says has that file in use.

  3. You can also see if the font is loaded by the system by checking out the keys in the registry here (assuming this is not where you checked already): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts and you may have to delete the font here before you can remove the file. Be careful not to delete the wrong thing here, as you can delete Windows's system fonts.

  4. You can try starting your PC in Safe Mode, which helps when something weird is running from drivers/services/system files, but makes some things harder.

  5. Try opening the file in notepad. It should be mostly unreadable, but have some data referring to the font name etc. You can try to edit it as well to see if you get more helpful error messages.

  6. Try booting to a linux live CD(/USB), and deleting the file from there. This requires some basic knowledge of how to mount your windows drive and navigate to the file, but is the most likely to work as it will ignore windows's processes and permissions. If removing using linux doesn't work, then you may have a bad hard drive :(.

For further troubleshooting, try posting the output of Powershell's Get-Acl /path/to/file | fl, whoami, and

$test = [System.IO.File]::Open("C:\path\to\file",'Open','Write')
$test
$test.Close()
$test.Dispose()`
  • 1
    That popup does not mean that the file is in use. It means exactly what it says. That the user account attempting to delete the file doesn't have permission to do so. Windows has a specific message about open file handles.. (from his question) " I received a popup saying the file was in use"... Boot into safe-mode. Login as "administrator".. try again. If the file is in use, use the System Internals Process Explorer to close the handle and try again. – Señor CMasMas Jan 7 at 17:00
  • 1
    I used the resource monitor to see what programs were accessing the text file. It said that explorer -- i closed it (not restart) and my desktop/icons went black. In order to restart it I had to run it from the task-manager "run new task." It is not in the registry there, i already checked. Tried safe mode. Powershell says that I am me, and that I'm in full control of the file. – Xzila Jan 7 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.