F5F Stay Refreshed Hardware Desktop Executing a bat file to import a reg file as an admin user in Python

Executing a bat file to import a reg file as an admin user in Python

Executing a bat file to import a reg file as an admin user in Python

K
Kamikaze_007
Senior Member
625
02-14-2021, 04:43 AM
#1
Hello. The command runs Powerrun with elevated privileges. It uses a batch file to execute another program. The issue seems linked to needing UAC, which explains why it doesn't work in basic commands. You might need to launch it through Python and prompt the user for UAC consent if that's possible.
K
Kamikaze_007
02-14-2021, 04:43 AM #1

Hello. The command runs Powerrun with elevated privileges. It uses a batch file to execute another program. The issue seems linked to needing UAC, which explains why it doesn't work in basic commands. You might need to launch it through Python and prompt the user for UAC consent if that's possible.

H
huuskyjerk
Member
170
02-14-2021, 11:52 AM
#2
It operates when you modify the command from using os.system to regedit commands, and functions smoothly.
H
huuskyjerk
02-14-2021, 11:52 AM #2

It operates when you modify the command from using os.system to regedit commands, and functions smoothly.