I'm using a logon batch script to copy some dll files into the c:\windows\system32 folder and register them with the regsrv32 command.
However, both actions fail.
I'm applying the script here: user configuration\policies\scripts (logon/logoff)/logon
The script itself does get executed. However, it just doesn't perform anything that requires admin credentials.
How can I fix this?
Using a User Logon Script policy will always run the script as the user. There's no getting around that. As an alternative, you could consider using a Computer Startup Script. These are excecuted as the Local System account, which will have privs roughly equivilent to a local administrator account.
Whenever I need to run a script at logon with a specific account or security context, I create it as a scheduled task that is triggered at logon.