Results 1 to 3 of 3

Thread: Run MSI from Command Line

  1. #1
    Thomas M. Guest

    Run MSI from Command Line

    XP SP2

    I'm doing some testing, and as part of the test I want to try running an MSI
    file with elevated privileges from a standard user account. I'm logged in
    with a standard user account and I want to run the MSI with administrative
    rights. There is no "Run as" option on the context menu for MSI files, but
    I found some information which indicates that it may be possible to run the
    file from the command line by using "runas" to launch MSIEXEC.EXE and
    specifying the MSI package. Here is the command that I am using:

    runas /user:Administrator "msiexec /i OdysseyClient.msi"

    When I execute the command I get prompted for the administrator password,
    and after I enter the password I get a Windows Installer dialog box showing
    me the command syntax. The MSI file never gets launched. I've tried a
    number of different syntax options with no luck.

    Can someone tell me if what I'm attempting is possible? If so, what is the
    correct syntax?

    --Tom



  2. #2
    Vinson Guest

    RE: Run MSI from Command Line

    When running from things from the command-line, I recommend that you always
    think in terms of the 8.3 format. If you type DIR /X on the command line,
    you will see both formats and you can translate OddysseyClient.msi to
    ODDYSS~1.MSI.

    Since you are running in another context, you might also specify the path to
    the MSI file; also in 8.3 format. See the sample below:

    runas /user:administrator "msiexec /i c:\patches\hivecl~1\oddyss~1.msi"

    Vinson

    "Thomas M." wrote:

    > XP SP2
    >
    > I'm doing some testing, and as part of the test I want to try running an MSI
    > file with elevated privileges from a standard user account. I'm logged in
    > with a standard user account and I want to run the MSI with administrative
    > rights. There is no "Run as" option on the context menu for MSI files, but
    > I found some information which indicates that it may be possible to run the
    > file from the command line by using "runas" to launch MSIEXEC.EXE and
    > specifying the MSI package. Here is the command that I am using:
    >
    > runas /user:Administrator "msiexec /i OdysseyClient.msi"
    >
    > When I execute the command I get prompted for the administrator password,
    > and after I enter the password I get a Windows Installer dialog box showing
    > me the command syntax. The MSI file never gets launched. I've tried a
    > number of different syntax options with no luck.
    >
    > Can someone tell me if what I'm attempting is possible? If so, what is the
    > correct syntax?
    >
    > --Tom
    >
    >
    >


  3. #3
    Thomas M. Guest

    Re: Run MSI from Command Line

    I added the full path to the file and that did the trick--the command now
    works. The 8.3 format didn't seem to matter for me, however, in my case the
    full path and file name does not contain any spaces, so I don't know if
    spaces would make a difference or not.

    --Tom

    "Vinson" <Vinson@discussions.microsoft.com> wrote in message
    news:515F496A-B650-4420-A549-10E4540D5809@microsoft.com...
    > When running from things from the command-line, I recommend that you
    > always
    > think in terms of the 8.3 format. If you type DIR /X on the command line,
    > you will see both formats and you can translate OddysseyClient.msi to
    > ODDYSS~1.MSI.
    >
    > Since you are running in another context, you might also specify the path
    > to
    > the MSI file; also in 8.3 format. See the sample below:
    >
    > runas /user:administrator "msiexec /i c:\patches\hivecl~1\oddyss~1.msi"
    >
    > Vinson
    >
    > "Thomas M." wrote:
    >
    >> XP SP2
    >>
    >> I'm doing some testing, and as part of the test I want to try running an
    >> MSI
    >> file with elevated privileges from a standard user account. I'm logged
    >> in
    >> with a standard user account and I want to run the MSI with
    >> administrative
    >> rights. There is no "Run as" option on the context menu for MSI files,
    >> but
    >> I found some information which indicates that it may be possible to run
    >> the
    >> file from the command line by using "runas" to launch MSIEXEC.EXE and
    >> specifying the MSI package. Here is the command that I am using:
    >>
    >> runas /user:Administrator "msiexec /i OdysseyClient.msi"
    >>
    >> When I execute the command I get prompted for the administrator password,
    >> and after I enter the password I get a Windows Installer dialog box
    >> showing
    >> me the command syntax. The MSI file never gets launched. I've tried a
    >> number of different syntax options with no luck.
    >>
    >> Can someone tell me if what I'm attempting is possible? If so, what is
    >> the
    >> correct syntax?
    >>
    >> --Tom
    >>
    >>
    >>




Similar Threads

  1. xcopy command line together with wmplayer command line
    By Aislinn in forum Operating Systems
    Replies: 5
    Last Post: 31-03-2010, 12:13 PM
  2. Can we use PHP from the command line?
    By kyosang in forum Software Development
    Replies: 5
    Last Post: 03-02-2010, 01:06 AM
  3. Replies: 3
    Last Post: 03-09-2009, 05:41 PM
  4. Command Line Ren (Rename) command broken?
    By SixSigmaGuy in forum Vista Help
    Replies: 2
    Last Post: 18-05-2008, 03:30 PM
  5. Replies: 1
    Last Post: 18-05-2007, 01:24 AM

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,711,642,820.36327 seconds with 17 queries