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
"Torsten Hensel" <he...@web.de> wrote in message
news:fc5d9d63.04012...@posting.google.com...
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
%windir%\system
Shawn
"Torsten Hensel" <he...@web.de> wrote in message
news:fc5d9d63.04012...@posting.google.com...