Remove a file that resists deletion with admin privileges (Gamespy Comrade)

1

I had the program Gamespy Comrade installed in my PC by Steam as parts of the requirements for some video game that I'm not using anymore. Gamespy has folded in 2013 and the program hasn't been supported since.

I decided to remove the program, but the folder doesn't contain any dedicated executable. I tried to remove all the files "manually", but one particular file can't be removed. It is a true-type font file (.tff) that can't be deleted, but can be renamed by the windows system explorer with administrator privileges.

By the file properties the administrator should have full control over the file, the output of trying to delete the file from an elevated Power Shell is:

Remove-Item : Cannot remove item C:\Program Files (x86)\GameSpy\Comrade\156\Skins\BF2142\swissck.ttf: Access to the path 'swissck.ttf' is denied.
At line:1 char:1
+ Remove-Item -path "C:\Program Files (x86)\GameSpy" -recurse -force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : PermissionDenied: (swissck.ttf:FileInfo) [Remove-Item], UnauthorizedAccessException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand

How can I get rid of this thing?

maja

Posted 2019-06-21T07:50:32.917

Reputation: 307

No answers