Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / December 2005

Tip: Looking for answers? Try searching our database.

Launching a MSI from a dotnet windows forms application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
segal.aviad@gmail.com - 12 Dec 2005 14:20 GMT
Hi,

I would like to create a windows form application, launching MSIs
created by setup projects. I have a few questions regarding the issue:
1)  How can I pass command line parameters to an msi?
2)  Where can I accept these arguments in the setup project?
3)  How can I launch the msi from the application?
4)  I would like to accept a target directory in the form application,
and copy all files specified
    in the setup project to that directory. Can I control the target
directory from outside the
    MSI?

Thanks in advance.
Phil Wilson - 12 Dec 2005 16:40 GMT
1. msiexec /i <path to your msi file> PROPERTY=somevalue from the command
prompt, although it looks to me as if you are doing this programmatically,
but anyway see msiexec command line options in MSDN.
2. They show up as properties in the setup that you use in brackets. What do
you want to do with them?
3. See the MSI APIs such as MsiInstallProduct.
4. Pass the install directory as TARGETDIR=<folder>. If you search MSDN for
TARGETDIR you'll see examples. You'd pass it into MsiInstallProduct in the
command line property.

I assume you'll launch the MSI files silently so that the user isn't shown
another dialog to enter the install location.
Signature

Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

> Hi,
>
[quoted text clipped - 10 lines]
>
> Thanks in advance.
segal.aviad@gmail.com - 13 Dec 2005 08:06 GMT
Hi,
Thanks for the quick reply.

I plan on building an installer using a few setup projects, and a
windows form application that will launch them.

Your assumption is correct, I plan to launch them silently. This is
where the application comes in - it is meant to present a user friendly
GUI.

Is the "package" refferd to in the API the MSI file? Can the
MsiInstallProduct be used with an MSI generated by a setup project?

Thanks
Phil Wilson - 13 Dec 2005 18:37 GMT
The package is the path to the MSI file, correct.  The APIs work on MSIs
generated by anything (there are currently around 20 tools that build MSI
files).
Signature

Phil Wilson [MVP Windows Installer]
----

> Hi,
> Thanks for the quick reply.
[quoted text clipped - 10 lines]
>
> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.