Jump to content

Recommended Posts

Posted (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 by Earthshine

My resources are limited. You must ask the right questions

 

Posted

:>

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

Posted

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

 

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...