VBS: Defining Impersonate Level as admin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kapik
    New Member
    • Mar 2012
    • 9

    VBS: Defining Impersonate Level as admin

    Hi!
    I am trying to use the following VBS (which I've found on BYTES) to start an aplication on remote PC.
    The issue is that I need to start it as an ADMIN (I have the passwords & login).

    How shall I modify the impersonationle vel to:
    Login as ADMIN @ remote PC (other profile than my current one on the Controlling PC)??

    Code:
    A = GetObject("winmgmts:{impersonationlevel=impersonate}!\\192.168.0.1\root\cimv2:Win32_Process").Create("C:\Program Files (x86)\Microsoft Office\Office12\Winword.exe", Null, Null, iProcID)

    Thanks for help!
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Just add your network account as an admin on the remote PC.

    Comment

    • kapik
      New Member
      • Mar 2012
      • 9

      #3
      What I understood:

      Control PC: I have to be logged as a user with Administrative Rights

      Remotely Controlled PC: My user ( one with which I am logged with @ Control PC must be actually a domain admin, to be able to log as an admin @ Remotely Controlled PC) has to be an admin - and current user of the OS system might be just a regular one?

      Please let me know if I understood you well :)

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You don't have to be an admin on the control PC, you just have to be an admin on the remote PC.

        Comment

        Working...