Trying to run a simple batch file at windows shutdown. Filename is log.bat
, contents is single line:
DEL C:\Users\tom\.VirtualBox\*.log*
I've tried placing this file at root, at windows/system32/grouppolicy/machine/scripts/shutdown
, and at windows/system32/grouppolicy/user/scripts/logoff
. I've tried running it as a shutdown script and as a logoff script.
The batch file works perfectly when double clicked from any location. It will not execute from GroupPolicy though. I've followed the instructions found here and elsewhere but it just doesn't work. Any ideas what I'm doing wrong? Thank you!
PC is standard home desktop, user has admin privileges and owns the files to be deleted.