Share this post

Link to post

Share on other sites

AdamUL 45

RunAs and RunAsWait does not request the Admin Token when it executes. It will only runs the process under the context of the requested user, not with full admin rights, even if the user is in the local Administrator's group. There are some workarounds for this, just search the forum for "RunAs Admin Token."

Share this post

Link to post

Share on other sites

DiegoT 0

RunAs and RunAsWait does not request the Admin Token when it executes. It will only runs the process under the context of the requested user, not with full admin rights, even if the user is in the local Administrator's group. There are some workarounds for this, just search the forum for "RunAs Admin Token."

Adam

Hi AdamUL, thank you for your reply.

So, I searched for "RunAs Admin Token" and I found some information about UAC, ConsentPromptBehaviorAdmin and #RequireAdmin but not that I can understand it in my case.

I just need to run a copy from a network share to "C:\program files\..." and the current user don't have permission on "C:\program files\".

Share this post

Link to post

Share on other sites

jguinch 350

So, you "just" need to bypass the UAC prompt ? Well, not easy. The simpler way is to specify the local builtin administrator account in your RunAs call. This account (not others local admins) is not concerned by the UAC prompt. If it doesn't have access to the remote share, use DriveMapAdd with a user having rights.