Windows Installer

Posted July 15, 2003

Chat Date: July 8, 2003

Please note: Portions of this transcript have been edited for clarity

Chat Participants:

  • Carolyn, Developer on the Windows Installer team
  • Chris, Developer on the Windows Installer Team
  • Ken, Tester on the Windows Installer Team
  • Eric Sassaman, Windows SDK Community Lead (PSS)

Moderator: Eric (Microsoft)
Welcome to today's Chat. Our topic is Windows Installer. Questions, comments, and suggestions are welcome. Let's introduce our hosts for today!

Host: Carolyn (Microsoft)
Hello! I'm Carolyn. I just reached my 4 year milestone as a developer on the Windows Installer team. I specialize in patching and upgrades, digital signatures, and general architecture.

Host: Ken (Microsoft)
Hello! My name is Ken and I am a tester on the Windows Installer Team

Host: Chris (Microsoft)
Greetings! I'm Chris, a developer on the Windows Installer Team. I've been working on MSI for about five years, with my areas of focus including custom actions, security, validation, source resolution, and overall architecture.

Moderator: Eric (Microsoft)
Welcome everyone, let's get started!

Host: Carolyn (Microsoft)
Q: I want to put a pushbutton next to my feature selection tree, so that when pushed, it launches a specific help file for the feature that is currently selected. How do I get the button to act according to the selected item in the tree?

A: Unfortunately this isn't really possible with the Windows Installer because there are no usable events that you can subscribe to for the selection tree. Therefore you can't know what item is selected. Saying that, the feature description is one way to provide more information about the feature (and perhaps avoid the help file requirement). Having events generated from the selection tree is a feature under consideration in a future release of the Windows Installer.

Host: Ken (Microsoft)
Q: what it the way to know if a certain package is installed known its package GUID?

A: There are APIs available that allows you to query the state of the package. You could use MsiQueryProductState to determine if a package is installed.

Host: Chris (Microsoft)
Q: Will the next version of the Windows Installer setup/projects in Visual Studio allow us to create our own dialog boxes, and not just the "template" ones that we currently have (4 checkboxes, 4 radio buttons, ect)?

A: MSI supports completely custom dialog boxes through edits to the MSI tables in the package (such as Dialog, Control, ControlEvent, etc). If a particular form of customization is not supported by your authoring tool, you may need to edit the MSI directly using a tool such as Orca (provided in the SDK). As for what editing functionality will be supported in future versions of Visual Studio, you will need to ask the Visual Studio team as we are not aware of their future plans.

Host: Carolyn (Microsoft)
Q: We have permission to distribute Internet Explorer and MSDE. In our current installer, some features need these, but others don’t. What is the best way to install them onto a user’s machine, if they select the features that depend on them?

A: Generally the best way to install Internet Explorer and MSDE will be through a bootstrap setup executable at this time. You certainly don't want to go the nested installation route as that makes updating those individually difficult. If your bootstrapper installs your own installation first, you could use the MSI API (eg. MsiQueryFeatureState) to determine if the feature(s) that requires either of the two is installed and then install those as necessary.

Host: Carolyn (Microsoft)
Q: In the MSI chat of June 5, Carolyn answered a question about shipping MSDE with an application by saying the recommended practice is to use the MSDE MSI file (and not the MSMs) since this allows for servicing of MSDE......Yet in the article Installing Desktop Engine at https://msdn.microsoft.com/library/default.asp?url=/library/en-us/distsql/distsql_84xl.asp, it recommends using the merge modules......I?m confused! I have inherited an installation file from a colleague who used the merge modules, and it nearly drove him insane! Where can I find more help on which is better, and if I use the MSI file, is it safe to nest it in my own MSI file?

A: Because of limitations in the merge module update story, using MSDE merge modules are not recommended anymore. The reason is that if there is an update for MSDE, then every setup author that consumed the MSDE merge module must now redistribute a patch for the update to MSDE. This is of course, difficult. Therefore the recommendation is to now use the MSI file since a single patch can be issued to update the MSDE installed by the MSI. You should not use a nested installation for similar reasons. Nested installations cannot be updated independently since they are dependent upon the parent install that carried them. Therefore, a bootstrap executable that installs both your MSI and MSDE is the recommended method. This was indicated in the ReadMe provided with the SP3 release of MSDE < https://support.microsoft.com/default.aspx?scid=/support/servicepacks/SQL/2000/SP3ReadMe.asp>.

Host: Chris (Microsoft)
Q: How is the best way to install drivers w/ installer?

A: The drivers team at Microsoft is working on a standard solution to integrate driver installs with MSI. More information should be available by the next DDC. You can also try joining the Beta through the normal Beta process, although I believe that Beta is already full. I'm hoping to get more information about this tool\Beta\DDC before the chat is over, but I can't promise anything. If I can't I will post additional information to the newsgroups.

Host: Carolyn (Microsoft)
Q: What are some of the new features that we can expect in the next release?

A: The next release of Windows Installer is version 3.0. This release focuses on making servicing better for authoring, creating, distributing, and managing updates to applications. Some of the new features under consideration in version 3.0 are the ability to uninstall patches, the ability to sequence patches, improved performance during patch application, enhanced source list API, the ability to install multiple patches in one transaction, and improved inventory API.

Host: Chris (Microsoft)
Q: Does Microsoft have any plans for significantly modifying the Installer technology based around .NET for Longhorn?

A: Unfortunately, it is still too early to make any comments about MSI's Longhorn plans.

Host: Carolyn (Microsoft)
Q: In a previous chat, I believe a representative from Microsoft acknowledge some inherent problems using "aas" files for advertising MSI products. Can you elaborate on any proposed changes to "aas advertising?"

A: There are some problems with "aas" files for advertising MSI products when dealing with heterogeneous environments. In situations where the deployment machine's hardware/architecture differs significantly from the target machine's hardware/architecture, you can end up with an advertise script that may not accurately reflect what should happen on the target machine. In Windows Server 2003, some of this was addressed through the use of platform simulation which would allow deployment of x86 packages from a 64-bit machine and vice-versa. Unfortunately, I can't elaborate much further on changes to this method of advertising as it's still in the early planning stages. Is there something in this behavior that is specifically affecting your environment?

Host: Chris (Microsoft)
Q: I'd really like to see a mechanism that would allow you to specify an ExternalUI from within the .msi itself. For example, an .exe in substorage and the Storage Name and Flags stored in the Summary information.

A: This is a commonly requested feature and it is definitely on the list for future consideration, since the benefits of such a feature are many. Unfortunately I can't say whether this feature will make it into any specific version. Currently using ExternalUI is limited to an outside bootstrapper or "control" process.

Host: Chris (Microsoft)
Q: (Security<-->MSI) Does msiexec behavior change if it is invoked by a process with "System" vs. "Administrator" (or other) privileges? Any other difference in behavior of Windows Installer under different security settings?

A: Yes, there are differences in behavior. First off, when running as System you will not be able to perform any per-user installs because the required profile data does not exist. Secondly, when writing deployment tools, etc, you will find that certain highly-privileged operations (such as advertising a product through MsiAdvertiseScript) will require LocalSystem rights (although for user operations you can also impersonate the user with LocalSystem process rights.).

Host: Carolyn (Microsoft)
Q: Is there a sample for an External UI similar to that of VS .NET installation?

A: As far as I know there isn't a sample that illustrates an external UI as complicated as the VS .NET installation. However, the Windows Installer documentation on MSDN provides some sample code that demonstrates how to handle the various messages that an external UI handler might receive. Look for the topic "Monitoring an Installation using MsiSetExternalUI". Hopefully it can give you a start on what you would need to do.

Host: Chris (Microsoft)
Q: Is there an estimated release date for MSI 3? If not, can we have a wild guess?

A: The Beta for MSI 3.0 will be later this summer. Signup details will be posted to the MSI newsgroups when they are available. The release date for MSI 3.0 is tentatively scheduled for Q1 2004.

Host: Carolyn (Microsoft)
Q: i build this asp.net websetup but when i run it in production it says "the specified path is unavailable". IIS might not be running or the path exists and is redirected to another machine. Please check the status os this virtual directory...

A: If the problem occurs during installation of the MSI package, you can generate Windows Installer verbose log files for help in diagnosing the setup failure. You can enable logging via system policy or through the command line (eg. "msiexec /isetup.msi /L*v logfile.txt"). It's also possible that this is specific to using Visual Studio .NET and is a problem in the Visual Studio environment. You may want to consult one of the Visual Studio newsgroups for help in that case.

Host: Chris (Microsoft)
Q: Any plans for releasing any managed interfaces (read: .NET) for using the MSI API's?

A: Such a feature is certainly under consideration, but no final decision or timeframe has been set. In the meantime, there are several .Net object wrappers around the existing MSI APIs available on the web from non-Microsoft sources, or you can create your own simple wrappers around the MSI Win32 APIs.

Host: Carolyn (Microsoft)
Q: Can I do a full push-installation by copying contents of InstallExecuteSequence to AdvtExecuteSequence? Any problems or side-effects?

A: There will definitely be problems with this approach because Windows Installer behaves differently when in advertise mode versus install mode. Is the reason for thinking about trying this because you want full-install for user assignments in Group Policy? Full-install is available in group policy for machine assigned applications. Beginning with Windows Server 2003, full-install is also available for user assignments with minimum XP client machines (and a Windows Server 2003 deployment machine).

Host: Ken (Microsoft)
Q: How to elegantly (and easily) disable Admin installation and make it show an "Admin not supported" message to the user?

A: You could modify the AdminExecuteSequence / AdminUISequence table to display a custom messsage that tells the user Admin installs are not supported

Host: Chris (Microsoft)
Q: I have a component containing a .exe file which is shared among multiple features. I am not able to use the extension table to assoc a file type with the exe, since it requires a single feature.

A: The feature associated in the Extension table indicates the feature to install when the extension is activated. Unfortunately it is not possible with the current architecture to associate multiple features with such an activation event. However it does not mean that the extension can not belong to a component which belongs to multiple features for normal install operations, just that the binding is only to one feature. One possibility is to use a custom action with the SetFeatureState methods to ensure similar (or compatible feature states). If the extension is tightly bound to one core hidden feature, you could set that feature to be installed whenever the loosely-bound features are activated. If the core feature is ever faulted in, you can ensure that the other features are set to local.

Host: Carolyn (Microsoft)
Q: I’m developing an installer that uses the ProductID to unlock features. The problem is that the standard place for this dialog (I’m using a Wise product) is after the condition table has been evaluated. If I make a new dialog for the ProductID before the condition table is evaluated, I get into trouble if the user wants to re-run the installer, using a new key, to unlock more features - If they then choose to remove the product, chaos ensues! Any ideas?

A: I'm not sure that I completely understand what you are attempting here, but is it not possible to condition this dialog based upon what the user wants to do? For example, normally the Welcome dialog in a setup is conditioned on "NOT Installed" so that it only appears on first-time installation. After that, the MaintenanceWelcome dialog is displayed generally offering the user the choice to "add/remove features", "repair", and "remove/uninstall". Couldn't you use this type of design in your situation (maybe an "unlock more features" button that invokes this new dialog)?

Host: Carolyn (Microsoft)
Q: (regarding AAS files) The behavior we'd like "corrected" is when deploying MSIs via Group Policy, properties are resolved at the time one creates the software package object, instead of when the software is advertised to the user. If one uses a property in the "working directory" of a shortcut, for example, this property could be resolved with the wrong value. An example of this is if one creates a software package object from a machine that has a larger "D:\" drive than their "C:\" drive, the working directory on the client's machine will resolve to "D:\" even if a "D:\" drive does not exist.

A: Yes, what you have indicated here is a known limitation. The target folder for the shortcut uses placeholders (generally when referring to shell folders) to ensure that the shortcut is placed in the correct location on all machines. However, the same is not currently done for the working directory and can pose a problem when the machine configurations between the deployment and target machines differ. This is one reason why the software deployment whitepapers recommend that the deployment machine match the client machine in configuration. I'll forward this information on to the appropriate individuals for future consideration.

Host: Ken (Microsoft)
Q: How come the additions to MSI for XP and 2003 were not available for at least Win 2000? Specifically I am referring to the multiple instances feature.

A: The ability to install multiple instances is supported on all versions of MSI but not through multiple instance transforms. Using multiple instance transforms is supported on Windows 2000 SP4, Windows Server 2003 and Windows XP Sp1

Host: Carolyn (Microsoft)
Q: Are details about msi 3.0 available to the public?

A: Yes, the first set of details about Windows Installer version 3.0 were provided in the Windows Installer chat in February of 2003. An additional set of information was provided in the Windows Installer newsgroups (you can search using google for the exact information). Look for more details in the upcoming weeks to be provided in the MSI newsgroups, including information on how to participate in the MSI 3.0 Beta program.

Host: Chris (Microsoft)
Q: Is there any way to have a shortcut reference the 2nd (or 3rd) icon from the target exe? I have created a separate icon file, and that works, but the icons are in our exe anyway, and all I need to do is set the shortcut to reference the 2nd icon.

A: The shortcut table has an IconIndex column which specifies the icon index (essentially the same as IShellLink::SetIconLocation). That should allow you to reference individual icons. Keep in mind though that advertised shortcuts may be created before the EXE is installed on the machine so the icons should reference the Icon table for best results.

Moderator: Eric (Microsoft)
Thanks for joining us today and thanks for the questions. It's time for us to go now. If we couldn't get to your question, please post it in one of the following newsgroups:

news://msnews.microsoft.com/microsoft.public.platformsdk.msi for developer questions, or

news://msnews.microsoft.com/microsoft.public.windows.msi for end-user/administrator questions.

Host: Chris (Microsoft)
There is no chat currently scheduled for August, but there will be information available on the MSI 3.0 Beta as soon as details are available.

Host: Chris (Microsoft)
Everybody should also say goodbye and Thanks to Eric, our host for the past 11 chats. This is his last chat as host.

Moderator: Eric (Microsoft)
And thanks Chris :-)

For further information on this topic please visit the following:

Newsgroups: microsoft.public.platformsdk.msi

MSI Transcripts: Read the archive of past MSI chats.

Website: Visit the Microsoft Windows Installer site.

Top of pageTop of page