Earthshine Posted November 28, 2017 Share Posted November 28, 2017 (edited) RunAsWait(@UserName, @ComputerName, "!PASS!", 0, "C:\Program Files (x86)\UserService\Admin.exe") Try that. You need to supply the Username, either yours or theirs, that will give you whomever is logged on. i ran this as a test, my password on vm is Hello1, lol, you don't need extra '' around the path to exe. RunAsWait(@UserName, @ComputerName, "Hello1", 0, "C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe") I am a Universalist now? sweet... keep em coming guys Edited November 28, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Rex Posted November 29, 2017 Author Share Posted November 29, 2017 I should have remembered to update this thread, when I found the solution - but I didn't. The solution was to edit the Group Policy for admin users, default it's set to Enabled Local Computer Policy -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> User Account Control: Run All administrators in Admin Approval Mode |-> Disabled Changing the above, made my script work as it did in server 2008 (apparently I had changed the above in 2k8 also) I haven't checked if it works in win10, course I don't have win10 installed. Cheers /Rex Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 you just downgraded your security too. I guess, if you are ok with that. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
AdamUL Posted November 29, 2017 Share Posted November 29, 2017 Instead of disabling UAC for the whole system, you could just disable it for Admins to allow run your script. Local Computer Policy -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode |-> Elevate without prompting. Adam Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted November 29, 2017 Share Posted November 29, 2017 or just use RunAsWait and provide credentials, and run it as GPO. did you even try that? it worked for a different user here yesterday uninstalling an application. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Adams Posted December 27, 2017 Share Posted December 27, 2017 (edited) I also saw the same problem with windows 10 Edited December 27, 2017 by Adams Adams Link to comment Share on other sites More sharing options...
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