Run VBS or as a different user

Posted on 2011-10-06
Last Modified: 2012-05-12
I have a script that installs a program with some options.  I then have the VBS run in AD as a logon script.

The issue I am having is that it runs as the current user, who is not a local admin, thus cannot install a program.

Is there a way to run that as a different user?
Question by:BEI_INC
    LVL 9

    Expert Comment

    You could use runas but that would not be safe as it would require you to embed privileged logon credentials.

    It is therefore suggested to use Group Policy to deploy application which require elevated privileges,

    Following link provides information on the same.

    Author Comment

    It's not an MSI, it's an EXE.

    Do you meanObjShell.runas?
    LVL 9

    Accepted Solution

    hi RUNAS is a windows command that permits a user to run an application using alternate privileges

    following link provides reference on runas command

    As regards to deploying non-MSI applications there is alternate method
    visit the following link for information on how to publish non-MSI files using Group Policy.

    Hope this helps

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now