Xichael Posted December 10, 2019 Posted December 10, 2019 For example, this won't work if the elevated Powershell window is minimized: WinActivate('Administrator: Windows PowerShell') But on an standard unelevated window, this works fine: WinActivate('Windows PowerShell')
Deye Posted December 10, 2019 Posted December 10, 2019 you will need administrator privileges in your script to be able to automated administrator based tasks add #require admin to the top
Xichael Posted December 10, 2019 Author Posted December 10, 2019 #RequireAdmin is exactly what I was missing, thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now