Running a remove command gets access denied

0

Hi, 

 

I have made a lockdown GPO for a windows 10 environment but I m having problems with one item, I want to remove the right click from the start button. I have discovered that this can be done quite easily by deleting the following folders..

rmdir "C:\Users\%username%\AppData\Local\Microsoft\Windows\WinX\Group1"
rmdir "C:\Users\%username%\AppData\Local\Microsoft\Windows\WinX\Group2"
rmdir "C:\Users\%username%\AppData\Local\Microsoft\Windows\WinX\Group3"

 

I have created a .bat file with just those 3 lines in, nothing else. I have created a package in PDQ but when I run it the output is access denied. 

 

The logged in user is not a domain admin but i am running it using my credentials in PDQ and i am a domain admin.

 

Any ideas?

Cancel
login to comment
0

and when i try that I get access denied, when I am logged in as the user though I can just go ahead and delete them using the delete key :baffled!@:

Cancel
login to comment

0

If you're running the package/step/batchfile as a domain admin, then %username% = that specified Domain Admin.

The only time %username%=logged on user, is when it's being run as "Logged on user"

Cancel
login to comment

Reply