BadToro
asked on
GPO on Win 2008 to delete a file from all users
Good Afternoon,
I would like to create a GPO to delete a file from all users desktops in our domain. I've noticed there was a way to delete a shortcut but this does not appear to work for executable files. Any help would be appreciated.
Thanks,
RD.
I would like to create a GPO to delete a file from all users desktops in our domain. I've noticed there was a way to delete a shortcut but this does not appear to work for executable files. Any help would be appreciated.
Thanks,
RD.
There is no native way to delete files with GPO.
You can use a GPO with a script, and will be that script that will delete the file...
You can use a GPO with a script, and will be that script that will delete the file...
ASKER
Here's what I've tried so far:
User Configuration\Preferences\ Windows Settings\Files - I then created a new file, set the action to delete and entered "%userprofile%\desktop\fil ename" in the delete files section.
My checked items under the common tab are :
Run in logged-on user's security context
Apply once and do not re apply
User Configuration\Preferences\
My checked items under the common tab are :
Run in logged-on user's security context
Apply once and do not re apply
Settings look good, it should work. If it doesn't work then I would suggest you to turn off firewall and ask user to restart workstation. If not you create a test machine environment and check the same.
ASKER
Ok, So I've tried editing the GPO using the computer configuration Preferences\Windows Settings\Files then the path. On the computer side, when I force the gpupdate, I get the error below:
The computer 'filename' preference item in the '{Policy Name}' Group Policy did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.
The computer 'filename' preference item in the '{Policy Name}' Group Policy did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.
ASKER
Other GPOs were applied. In essence, I'm deleting an old executable file and placing the updated version of that file.
I new file is creating, but the old file isn't being deleted.
I new file is creating, but the old file isn't being deleted.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help. I used another machine and user to test and it worked fine, will troubleshoot permissions on my test pc.
RD
RD
Hope this helps.