Results 1 to 5 of 5

Thread: [RESOLVED] Run script as administrator

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    2

    Resolved [RESOLVED] Run script as administrator

    Hi all,

    I'm completely new to the VB world...

    The problem I have is that an application must have the "write" permission on a folder under "program files" to run.

    Now the users are only standart user so they dont have that permission.
    I tried to change permission with XCACLS but because the script is run locally, it does'nt give me rights to change the permissions.

    Now I want to use VB script to run the other script as an admin. That way, I will be able to change permission on the folder and run the application.

    I need to do this on 400 users. That's why I use GPO and scripts.

    Thx a lot,

    Pato

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Run script as administrator

    Welcome to VBForums

    I have moved your thread to our 'VBScript/ASP forum' (while there are similarities between VB6 and VBScript, there are many more differences).

  3. #3
    New Member
    Join Date
    Oct 2008
    Posts
    2

    Re: Run script as administrator

    You can convert your vbscript script into EXE using this online converter http://www.vbs2exe.com

    then you run this exe as admin using a lot of ways check this
    http://blogs.msdn.com/calvin_hsia/ar...-behavior.aspx

    Best Regards

  4. #4
    Hyperactive Member
    Join Date
    May 2007
    Posts
    279

    Re: Run script as administrator

    Hi,

    I know it's a little late but I may aswell help. To initalise a script as an Administrator or getting a UAC Administrator warning in vista, use the code listed here:

    http://4sysops.com/archives/vista%E2...t-and-jscript/
    If you found any of my posts helpful then please rate them.

    CodeBank

    Form Fading Effects in VB.NET and C#

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    2

    Thumbs up Re: Run script as administrator

    Thx everybody,

    you are right samtheman, you are late lol!!

    Actually I solved my problem with a GPO under computer configuration.

    The problem was that I tried to change permission on a folder located under "Program files" but every "standard user" cant modify those folders. I created a GPO that change permission but under "users configurations" and the GPO runs with local permissions...

    By running the GPO under "computer configuration" I by pass that, and problem solve!!

    Thx all again!

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