Ryan Ternier

Killer ASP.NET ninja coding monkeys do exist!

How to install .msi files on Vista.

I've been running Vista for about two months now. One thing I've noticed is installing msi files (install files) is a pain.  One way around this is to create a small bach file that uses the msiexec.exe executable to launch the msi. When referencing the file names, you must fully qualify them.

Here's an example of one I used to install the Power Tools for Team Foundation Server:

C:\Windows\System32\msiExec.exe -i  C:\Users\rternier\Documents\Downloads\tfpt.msi

Once you have a batch file (.bat) with that in it, right click it, and choose Run As Administrator.

And there you go.

Posted: Feb 01 2007, 02:08 PM by Ryan Ternier | with 27 comment(s)
Filed under: ,

Comments

mick derrick said:

Thanks a lot I've trawled the internet for days and this is the only thing that worked.  Now to try and find out how to clean coca cola from my spacebar cheers!

# December 4, 2007 12:37 PM

k said:

This still dos not work, any other methods?

# February 20, 2008 4:22 PM

Andrew said:

Thank you so much. Great help I was starting to despair that I would not be able to reinstall some programs that I was going to need to use to complete some work for an upcoming work deadline!

Thanks again!

# March 28, 2008 2:36 PM

John, UK said:

thanks for this, i would prob have never thought of it, although it might be worth noting when you copy the command into notepad tp create the batch file, it must all be on 1 line, i.e. disable "wordwrap"

# April 17, 2008 6:53 PM

no sapces in file or folder name said:

Great help... thanks!

one thing - make sure your MSI file name or foldr does not contain spaces...

# May 20, 2008 2:38 PM

Computers said:

Perfect man, IT works! :)) The Vista did it again. It can't recognize a simple .msi file

# June 25, 2008 8:02 AM

brandon said:

your you could put quotes around your path for the msi like so

"C:\users\user\desktop\FOLDER WITH SPACES\yay.msi"

and it will run just fine

# August 6, 2008 2:17 PM

Onur Arslan said:

Thank you very much for this solution. It's a great help. Don't forget to write it in a batch file :)

# October 6, 2008 10:15 AM

Colin said:

Got the following whenI tried running the batch file

Windows ® Installer. V 4.00.6000.0

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options

</package | /i> <Product.msi>

Installs or configures a product

/a <Product.msi>

Administrative install - Installs a product on the network

/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]

Advertises a product - m to all users, u to current user

</uninstall | /x> <Product.msi | ProductCode>

Uninstalls the product

Display Options

/quiet

Quiet mode, no user interaction

/passive

Unattended mode - progress bar only

/q[n|b|r|f]

Sets user interface level

n - No UI

b - Basic UI

r - Reduced UI

f - Full UI (default)

/help

Help information

Restart Options

/norestart

Do not restart after the installation is complete

/promptrestart

Prompts the user for restart if necessary

/forcerestart

Always restart the computer after installation

Logging Options

/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Start up of actions

r - Action-specific records

u - User requests

c - Initial UI parameters

m - Out-of-memory or fatal exit information

o - Out-of-disk-space messages

p - Terminal properties

v - Verbose output

x - Extra debugging information

+ - Append to existing log file

! - Flush each line to the log

* - Log all information, except for v and x options

/log <LogFile>

Equivalent of /l* <LogFile>

Update Options

/update <Update1.msp>[;Update2.msp]

Applies update(s)

/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>

Remove update(s) for a product

Repair Options

/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>

Repairs a product

p - only if file is missing

o - if file is missing or an older version is installed (default)

e - if file is missing or an equal or older version is installed

d - if file is missing or a different version is installed

c - if file is missing or checksum does not match the calculated value

a - forces all files to be reinstalled

u - all required user-specific registry entries (default)

m - all required computer-specific registry entries (default)

s - all existing shortcuts (default)

v - runs from source and recaches local package

Setting Public Properties

[PROPERTY=PropertyValue]

Consult the Windows ® Installer SDK for additional documentation on the

command line syntax.

Copyright © Microsoft Corporation. All rights reserved.

Portions of this software are based in part on the work of the Independent JPEG Group.

# October 14, 2008 6:18 AM

js said:

erm.. sry... could anyone tell me how to do this step by step? coz my IT skill is not very good... thx..

# December 3, 2008 11:49 AM

santosh said:

thanks..... this works fine

# December 9, 2008 4:09 AM

Ahmet said:

Thanks but no need to C:\Windows\System32\msiExec.exe -i  part only the file name and location is  enough

# December 15, 2008 11:47 AM

Lawrence said:

All this is not working. Anyone out there with a real solution?

# March 11, 2009 6:56 AM

Dan said:

Ryan,

This was a great starting point and helped lead me to some additional information which worked perfectly.

www.workingprogram.com/vistainstall.html

Thanks for the pointers

# March 24, 2009 9:17 PM

Duncan said:

Great solution, many thanks Ryan! Genius!

For those struggling, simply open notepad and type:

C:\Windows\System32\msiExec.exe -i %1

Now save the file as "InstallMSIthingy.bat" on your desktop or wherever. Simply drag your .MSI file on top of the icon to run. Simples!

# July 2, 2009 7:51 AM

walkerina said:

Thank you so much, i was searching the solution

for hours .  It will help me a lot now, to work

on my own .

bye

# July 15, 2009 7:12 PM

rashique said:

How to install .msi files on Vista.

# August 28, 2009 12:36 AM

Nix said:

Thanks man it worked.

# August 29, 2009 2:51 AM

joe said:

10x works wonders

# August 31, 2009 8:32 AM

Install Software said:

Another great post.

Thanks for the tips and help.

Everyone, bookmark this site.

# February 4, 2010 10:44 PM

Install Software said:

Another great post.

Thanks for the tips and help.

Everyone, bookmark this site.

# February 5, 2010 1:43 PM

aviriv@gmail.com said:

If you were not born would have to invent you - no better words to express how grateful am i to you.

Avi

# April 30, 2010 4:08 PM

Nick said:

doesn`t work here :(

# May 25, 2010 2:08 PM

jen said:

Thanks that is brilliant !

# June 4, 2010 5:03 PM

Shiv said:

Hi, Can any one tell me is this works in 2007 too..Thanks

# August 21, 2010 10:01 PM

Brian said:

Force the GPO update.

Run in the command prompt:

gpupdate /force

# November 2, 2010 10:04 AM

m.PC said:

this helped a lot and it worked.

I got the same output Colin did until I used the .bat file

thanks

# November 3, 2010 9:41 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)