I've written a (VB) script that when deployed via SCCM silently deletes an old program off a PC that is not being used anymore. On most PCs this works fine, but on a small proportion of PCs, this fails to delete some TTF font files that are stored in a subfolder of the programme's installation folder in Program Files.
eg C:\Program Files\Supplier\AppName\Fonts
If I try and delete them manually through the GUI it acts as though they're in use and if I try it from a command prompt I get an Access Denied. Effective Permissions shows I have full control and from a command prompt I CAN /rename/ them or /move/ them to a different folder but not delete them! The files only have the +A attribute. I can't run Handle against the PC (remotely) as it would pop up the EULA box. I suspect it will merely show them locked by Explorer.
My uninstalling script uses the FileSystemObject to recursively delete the app folder like this:
Sub DeleteFolder(ByVal strFolder)
a) Bind to strFolder using the FSO
b) Enumerate subfolders
c) For Each subfolder, Call the Sub again specifying the subfolder path
d) Use the folder's Files collection to enumerate and then [force] delete all files in the folder
e) Delete the now empty folder
Has anyone seen this phenomenon before? (Windows XP)
After a bit of Googling I found someone else who'd seen something similar having dropped a TTF file to their desktop. No obvious reason though and I don't know why it only sometimes happens.