VB Script to change folder permission on the fly in Vista?
Posted on 2009-02-13
I am doing huge volume of OCRing. My OCR program insists on saving untitled folders in my User\Mike\AppData\Local\Temp folder. I discovered this when it hit 10K folders and the software would no longer run. I have a VBS that deletes the Untiled folders and contents, but get "permission denied" errors unless I first uncheck "read only" in the Properties dialog, and keep the OCR from running while the script deletes the folders. Because the SW keeps making these (maybe 8 to ten an hour) I cannot use some command line / startup command. What I need is a method to incorportate into my deleting program that, just before it tries to delete a folder, it resets the permission away from Read Only.
I tried all of the UAC, global permissions, etc, tricks, and the only thing that works is to reset the folder and file attributes.
OS = Vista32 Biz