Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is msiexec.exe

2,960 views
Skip to first unread message

Torsten Hensel

unread,
Jan 21, 2004, 9:59:01 AM1/21/04
to
Hi!

I want to launch an installation with msiexec /i from a program
written with Visual C++. Is MS installer always installed to the
windows system folder? If this is correct I could try to get the
system folder - how can I do this? - and execute
[SystemFolder]\msiexec.exe /i ...

If this is wrong, how can I get the location of msiexec.exe without
searching all local hard disks? The key
HKLMachine\Software\Microsoft\Windows\CurrentVersion\Installer -
InstallerLocation is not always present (it is on my WinXP system, but
not on a Win2000 system).

Or can I assume that msiexec.exe always lies in the PATH... no, that's
not so good, the user could have changed the PATH, then my program
would not work anymore.

I hope someone can help me. How can I launch msiexec.exe on any system
without knowing the exact location and searching the complete system?

Regards,
Torsten Hensel

Trent Stensnes

unread,
Jan 21, 2004, 11:03:38 AM1/21/04
to
I don't think you have to worry about where msiexec is, just launch it like
this: "msiexec /i "my.msi". If the system can't find it, something is wrong.

"Torsten Hensel" <he...@web.de> wrote in message
news:fc5d9d63.04012...@posting.google.com...

Torsten Hensel

unread,
Jan 22, 2004, 3:17:58 AM1/22/04
to
"Trent Stensnes" <som...@online.no> wrote:
> I don't think you have to worry about where msiexec is, just launch it like
> this: "msiexec /i "my.msi". If the system can't find it, something is wrong.

On a system running Windows 98 the call of msiexec /i... failed,
because somehow c:\windows\system was not part of the path. There
might be something wrong with this system, but I found a (imho) better
solution, that doesn't need to know where the msiexec.exe is located.

I'm using MSI functions directly from my C++ program:

MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
if (MsiInstallProduct("my.msi", "") == ERROR_SUCCESS)
{ // do something

This installs my.msi without user interface, regardless of the
location of msiexec.exe.

Regards,
Torsten Hensel

shawn

unread,
Jan 23, 2004, 9:39:12 AM1/23/04
to
For 98:

%windir%\system

Shawn

"Torsten Hensel" <he...@web.de> wrote in message
news:fc5d9d63.04012...@posting.google.com...

0 new messages