We are having trouble with the annoying HSPERFDATA_Username folders that Java is creating and then deciding to remove the Admin Permissions on!
We run Delprof on reboot and this looks like it is failing to completely remove the folder due to these folders.
Every time the user logs back in they create a new local profile with USERNAME.001 , USERNAME.002 etc on the end
I have this in a batch script,
cacls "%temp%\hsperfdata*" /e /p Everyone:F
this works fine but would prefer a VBS:
on error resume next
Set objShell = wscript.createObject("wscript.shell")
wscript.sleep(10000) '1 second
objShell.Run("cacls "%temp%\hsperfdata*" /e /p Everyone:F"), 0
Is there a way to reference the %temp% dir? as VBS doesnt seem to like it?
There are currently 1 users browsing this thread. (0 members and 1 guests)