I'd need to update a Windows file in the system32-folder
I've made a script to do this task. When I run it locally on a system (from a prompt with elevated privileges) it works fine.
I've created a GPO where this script is set under computer policies > Windows settings > Scripts > Startup (as I recall this will run the script at startup with the SYSTEM account which has all needed privileges)
The script executes , but the file is not updated. I know this is because of the UAC preventing this.
Is there a method of achieving this (without turning off the UAC)?
Best Answer
Do you need to run the script each time to update the file or do you need to run it just once locally? If the latter, the solution would be to use a very crafty console-based application, PSexec. Please note that you must be an administrator on the machine you are running the script on.
Then you create a folder on a local/mapped drive containing:
My normal PSexec payloads are:
an example launcher goes like this: