Results 1 to 2 of 2

Thread: Can I run a vbs script as another user (local admin)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    1

    Can I run a vbs script as another user (local admin)

    How do I add username and password information to a vbs script
    if the normal login does not provide admin access?

    It's a vbs script in a .bat file. So the answer may be in batch format or in vbs format.

    I wanna write in the HKLM during logon.

    A code sample would be helpful

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Quite simply - you can't!

    VBScript is a cut down scripting language & is permanatley restricted from doing this. You need to use normal vb, and play with the API for this type of thing.

    I'm not sure about the batch files side - whether they will have access or not...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width