Results 1 to 4 of 4

Thread: Running an Install from a .bat file with admin privileges?

  1. #1
    Broonie Guest

    Running an Install from a .bat file with admin privileges?

    Is there any way to run an application installation with elevated
    privileges from a bat file residing on a CD?

    We have an application that requires DotNet 3.5 so we were thinking of
    creating CDs which contain both the application installer (an .msi)
    and the DotNet installer (an .exe) along with a .bat file that starts
    the whole thing of. The idea is that the users (all in remote offices
    with very little bandwidth) put the CD the drive, double-click on
    the .bat file then walk away while a silent install of .Net and the
    applcation takes place. None of the users will have install privileges
    though, so is there anything I can do in the .bat file to run both the
    installs with elevated privileges?

    Cheers
    C

  2. #2
    ju.c Guest

    Re: Running an Install from a .bat file with admin privileges?

    Use the runas command:

    "Allows a user to run specific tools and programs with different
    permissions than the user's current logon provides."

    http://technet.microsoft.com/en-us/l.../cc772672.aspx

  3. #3
    Broonie Guest

    Re: Running an Install from a .bat file with admin privileges?

    I meant to add that I don't want the user to have to enter a password.
    I want to to pass the password to UAC in the batch file. I realise
    that means the user can see the password.

  4. #4
    ju.c Guest

    Re: Running an Install from a .bat file with admin privileges?

    Do they have the right-click option "Run as Administrator" ?

    If not you can add it and test it yourself first.

    [HKEY_CLASSES_ROOT\batfile\shell\runas]
    @="Run as Administrator"

    [HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    @="\"%1\" %*"

Similar Threads

  1. Replies: 4
    Last Post: 10-01-2011, 10:06 PM
  2. Replies: 4
    Last Post: 11-09-2009, 07:55 AM
  3. Not having admin privileges on Laptop
    By jeffcoo in forum Operating Systems
    Replies: 4
    Last Post: 14-03-2009, 08:27 AM
  4. Lost Admin Privileges in Vista
    By Charles Nuglene in forum Vista Help
    Replies: 8
    Last Post: 10-07-2008, 04:19 AM
  5. Replies: 2
    Last Post: 20-03-2007, 04:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,018,776.26740 seconds with 16 queries