0

We have some leftover folders in "Start" - "All Program" on user's Win7 PCs. I am trying to run a logon script to have it removed from C:\ProgramData\Microsoft\Windows\Start Menu\Programs\xxxx. but with login script, it runs on user, so it has no permission to delete folders in startup menu.

How can I run this logon script with domain admin privilege?

Root Loop
  • 902
  • 4
  • 24
  • 45

1 Answers1

1

How can I run this logon script with domain admin privilege?

You can’t. Login scripts run in the user context. They only have access to what the logged in user has access to.

The folder you are referring to is in the system context. In other words, it is not user specific and applies to all users on the system.

Your script needs to run as a “startup” script. Not a “login” script. Startup scripts run as SYSTEM.

You can also easily remove these files with group policy preferences. Again, these would be applied to the computer context, not a user context. In my opinion, GPO would be more reliable and better than a startup script, and would not depend on the computer rebooting to be applied.

Appleoddity
  • 3,488
  • 2
  • 13
  • 33