다음을 통해 공유


Windows Installer - General Discussion

Posted February 18, 2003

Chat Date: February 4, 2003

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

Chat Participants:

  • Carolyn, a developer on the Windows Installer team
  • Chris, a developer on the Windows Installer Team
  • Mark, Technical Lead on the Windows Installer Developer Support team
  • Eric Sassaman, Windows SDK Community Lead (PSS)

Moderator: Eric Sassaman (Microsoft)
Welcome to today's Chat. Our topic is Windows Installer - General Discussion. We have a great line-up of experts ready to tackle your questions. Let’s have them introduce themselves.

Host: Carolyn (Microsoft)
Hello! I'm Carolyn, a developer on the Windows Installer team. I have been on the Windows Installer team for almost four years and specialize in patching and upgrades, digital signatures, and overall architecture.

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

Host: Mark (Microsoft)
Hi everyone. I am the Technical Lead on the Windows Installer Developer Support team here at Microsoft and look forward to working with you.

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

Host: Chris (Microsoft)
Q: Are there msi obfuscators?

A: Microsoft does not provide an obfuscator, the MSI format was designed to be intentionally transparent to meet the needs of system administrators, who always want information about what changes a package will make. You may be able to find a third-party obfuscator.

Host: Carolyn (Microsoft)
Q: How do I include patch specific custom actions?

A: You can add custom actions using a patch. All that is required is that the new custom action be included in your update package from which you generate the patch. Whether or not the custom action executes depends upon the condition on the custom action.

Host: Carolyn (Microsoft)
Q: Are there any plans to change the behavior of how ".aas" files advertise MSI packages?

A: There are no concrete plans to change the behavior of how ".aas" files advertise MSI packages; however, there are discussions about changing group policy in future releases. Is there an issue with .aas files that you'd like to see addressed?

Host: Chris (Microsoft)
Q: How is it to turn Full UI for uninstallation via Add/Remove Programs in Control Panel?

A: By default Add\Remove Programs control-panel applet is responsible for choosing the UI level used for removal, and will select Basic UI. By using the ARP* properties you can control the buttons that appear (different buttons use different UI levels.) In order to take full control of the UI level, you will need to take complete control of the ARP entry my creating it manually (through the registry table perhaps) and setting the ARPSYSTEMCOMPONENT to hide the default MSI entry. You will then need to create the appropriate command lines yourself.

Host: Carolyn (Microsoft)
Q: What fixes in MSI will be included in Windows 2000 SP4?

A: We can't provide a specific list of fixes for Windows 2000 SP4 at this time, but the version of Windows Installer included with SP4 will at least have parity with Windows XP SP1.

Host: Chris (Microsoft)
Q: I understand that calling Custom Action 19 should gracefully terminate the installation -- displaying the message I include as a parameter to the action and rolling everything back. Yet when I try, the process just aborts with an in ternal error

A: It is difficult to say exactly what the problem is, but a Type 19 custom action simply creates an immediate failure in the sequence. If a message is not being posted, you might want to check the UI level of the product, and if using authored UI that your authored error dialog is correctly authored.

Host: Carolyn (Microsoft)
Q: Are there any plans to allow us to host active x controls on Windows Installer dialogs during UI portion of install?

A: Improving the UI capabilities is under consideration in a future version of the Installer. Today you could use an external UI handler to provide your custom UI. This would give you the flexibility to use HTML based UI, etc.

Host: Chris (Microsoft)
Q: Is there any other way to get access to Properties in the Deferred execution? The only way I know is from CustomActionData in VBS, and even then, you only have access to one property.

A: The CustomActionData property is the only way to access property data in a deferred custom action. Using a type 51 action, you can usually encode several values into the single property.

Host: Carolyn (Microsoft)
Q: How to create a single patch when the base product may have different Features? Feature installlevel is set to 0 based on license.

A: You should be able to generate a single patch for the base product and if I understand you correctly, it should be a pretty straight-forward target to update image mapping. A patch is just a delta between the two images. Application of a patch is using a reinstall, so if those different

features aren't installed, then they won't be installed when the patch is applied.

Host: Carolyn (Microsoft)
Q: Will we see a Windows Installer option that is managed?

A: Can you clarify what you are asking here? Are you talking about the ability to write managed custom actions or have managed MSI API?

Host: Chris (Microsoft)
Q: It doesn't appear that Class/ProgId/TypeLib respect component ref counting. Is that true?

A: These tables do support refcounting, in that they are merely resources of components that are refcounted normally, however when multiple products each try to advertise the same CLSID, things can be a bit confusing. This is similar to the "extension grabbing" behavior, in that the last product takes ownership of the CLSID. (The behavior would be very confusing if repairing a CLSID repaired 6 different products.) When one of the products is uninstalled, the others should remain and reassert their claim on the CLSID. Working with products installed for different users adds a bit more complexity as well.

Host: Chris (Microsoft)
Q: Since shared components are not supposed to be placed in System32, in the case of shared commercial components with no .msm, where should they go?

A: The CommonFiles folder (with a subdirectory for the component's company) is a common location.

Host: Carolyn (Microsoft)
Q: I have included certain custom actions as part of the "Upgraded" image and created and installed the patch. These custom actions are being invoked each time when I install any additional patches! How do I prevent that?

A: Okay, so I think what you are trying to say is you only want the custom action to run when you apply the patch and at no time after that? If that's the case, make a copy of your upgrade msi file and add some special authoring to it. Reference this upgrade MSI file in the PatchMsiPatch column of the UpgradedImages table. The condition you should set on your custom action is "PATCH AND PATCH=MEDIASRCPROP" where MEDIASRCPROP is the property you specified in the MediaSrcPropName column of the ImageFamilies table. (Leave off the quotation marks)

Host: Chris (Microsoft)
Q: Can you elaborate as to why there is a non-key Feature_ column in the Class table (and not, for example, a FeatureClass table)? When you have multiple COM MSM's, what is the recommended way for associating them with features?

A: This was simply a design decision of the installer - each CLSID would be listed at most once and advertised for a single feature. If you have multiple COM MSMs, you can use the MSM's feature substitution to associate the MSMs with any feature at merge time. Unless you are installing the same resource from multiple MSMs, you should not get any merge conflicts.

Host: Carolyn (Microsoft)
Q: How do I cleanup the MSI database from the new properties created and set by a patch install?

A: I'm not sure what you mean by cleanup the MSI database? Properties as authored in the package and/or patch are available at run-time. Their values are not persisted. A patch is never persisted to the cached .msi file. It is only applied in memory. (Note that for administrative images, patching works a bit differently.)

Host: Carolyn (Microsoft)
Q: Can I have new properties set in the PCP file and how do I access through custom actions? (because MsiGetProperty() API not seems to be getting those values)

A: The PCP file is only used to specify information for generating the MSP. Items specified in the Properties table are not added to the MSP, they are only used for configuration for patchwiz. If you want properties to be available, then they need to be added to your package on your upgraded image.

Host: Chris (Microsoft)
Q: Is support coming for File System drivers? Install/Start/Stop/Remove?

A: This is a problem that we are working with the driver team to solve, but I can't provide any specifics at this time.

Host: Chris (Microsoft)
Q: What is the best way to pass parameters from MSI to MSM? We have MSI project that includes a number of MSMs. We would like to pass some parameters to MSMs. What would be the best approach?

A: The best way to pass additional information to a merge module at merge time beyond the basic Feature\Directory attachment is to write a Configurable Merge Module. CMSMs are an extremely powerful and flexible way to provide a strongly-typed set of arguments to the module consumer and ensure that those arguments are used in a well-defined way. See the MSI help file for details on how to author a configurable merge module. Orca supports merging of CMSMs, other authoring tools may as well.

Host: Carolyn (Microsoft)
Q: We are seeing the "Error Applying Transforms" problem. How exactly can we prevent this from happening?

A: It depends on the exact cause of the error. First, are you using transforms? Secondly, I'd recommend generating a verbose log file to log the installation. You should then have more information about why the Installer is failing to apply transforms. You'll probably see some 22XX type error message that would indicate the problem. Those error messages are documented in MSDN.

Host: Carolyn (Microsoft)
Q: If the first install had featureA installLevel at 0, and the Patch tries to change the version of the files associated with Feature A, the Patch exits with an error

A: Interesting. I'm not aware of any problem like this and there's not enough information here for me to comment further. A verbose log file would provide more information about what is going on. You can follow up in the public newsgroup (microsoft.public.platformsdk.msi).

Host: Chris (Microsoft)
Q: (follow-up Class table) Merge conflicts aside, if the MSM's are associated with multiple features, it's the luck of the draw which feature it gets associated with. We've seen strange problems because of this.

A: It is not really "luck of the draw". The feature provided during the "Merge" call to the mergemod interface is the primary feature associated with the CLSID for advertisement (as well as for all other advertised resources). This is the feature used for feature substitution. Additional features provided via the "Connect" method are used to associate the module's components with the feature via the FeatureComponents table, but do not associate with the advertised data from the module. For most tools which allow specification of multiple features, the primary feature is the first one in the list, all other features are additional features used for "connect". Your authoring tool may vary slightly in how it determines which feature is primary.

Host: Chris (Microsoft)
Q: Is there a way to merge a Configurable Merge Module without using a tool with a UI. (ie. that could be automated in a script)

A: This depends on your authoring tool. Configurable Merge Modules are exposed via the same API\Automation model as regular merge modules, so it is available to command line tools. Orca supports CMSMs from the command line and a response file, with the format "X=Y" where X is the item identifier and Y is the value. Other tools may do things differently.

Host: Carolyn (Microsoft)
Q: We cannot reproduce the "Error Applying Transforms" consistently. We do use transforms (for language specific strings). We see the error on Win9X systems (or 2k or XP upgraded from 9X). The logging we have been able to gather... points to the registry having the Transforms=<path> and the file that it points to has been removed. You had the same problem with Office 2000. What method did you use to fix it?

A: I wasn't on the Office 2000 team so I can't comment on how they fixed it or what their problem was. Perhaps the knowledge base has more information (search https://support.microsoft.com). If the cached transform is missing, then the Installer will attempt to find the transform from its registered location. It would either be embedded inside the package, at its full path, or at the source depending on the transform you used.

Host: Chris (Microsoft)
Q: How does one force complete reinstallation of the windows installer service? The service has been shaky on my box lately, but the instmsi.exe refuses to run saying I already have the service.

A: Please see KB article Q319624 for information on diagnosing and repairing the MSI service.

Host: Carolyn (Microsoft)
Q: Regarding the "LockPermissions" table. Can you explain the design decision/goal behind using the "CreateFolder" rather than the "Directory" table to secure folders? It seems more intuitive to use the "Directory" table for this purpose.

A: Directories authored in the Directory table won't be created unless you install resources to them. The CreateFolder table gives you better control over setting permissions on directories because the folders will be created, whether or not you install resources to them. There are some known limitations with the LockPermissions table and this is definitely an area under consideration for improvement in a future release.

Host: Chris (Microsoft)
Q: (follow-up Class table) What happens if the primary feature is not selected for installation?

A: After the merge, there really isn't such a thing as "primary feature" anymore, there are just "features advertised by the CLSID" and "features not advertised by the CLSID" so the behavior is no different from if the package were manually authored in a similar manner. If the feature is not set to install, the CLSID won't be advertised or installed, but the bits will be installed if another feature that they belong to is installed. If the "feature formally known as primary" is set to advertise, the CLSID will be advertised but the bits will potentially be fully installed due to another feature's state. In this case, activation of the CLSID should trigger a lightning fast-repair of the shared components and a normal repair of any components that weren't installed already. This behavior is the primary drawback of the current Class table design, and is something that we have looked at fixing. Of course, I can't provide details.

Host: Carolyn (Microsoft)
Q: Are there updates planned for updates to the LockPermissions table functionality, seeing as how it replaces permissions?

A: There are definitely several limitations to the existing functionality provided by the LockPermissions table. It doesn't really allow you to deny permissions, among other things. The LockPermissions table functionality is definitely one are under consideration for improvement in a future release. Do you have any specific requests of functionality that you would like to have added to the LockPermissions table?

Host: Chris (Microsoft)
Q: Is there a way to hook MSIEXEC's system-wide monitoring/event-triggers? Such that all advertise (or maybe even repair) checks could have a follow-up tester/handler? This would allow much more customized/powerful resiliency/advertising.

A: Currently there is no way to hook up directly, but MSI installations triggered by auto-repair or advertised fault-in post distinctive events to the event log with information on the failed detection and resulting repair operations. These events could be processed to obtain the necessary information. If your infrastructure contains remote event management, you could theoretically even access this information from remote machines.

Host: Chris (Microsoft)
Q: Is it possible to disable auto-repair? (I've been told that setting Disallow Advertise for a Feature should do this, but it doesn't seem to work.)

A: For entry points such as shortcuts, CLSIDs, etc, auto-repair can be disabled by making the entry points non-advertised. (For CLSIDs, use the registry table, for Shortcuts - provide an explicit target). If a resource is advertised, auto-repair is an implicit part of its behavior.

Host: Carolyn (Microsoft)
Q: Is it possible to have the uninstall of one msi also uninstall another msi (that it did NOT originally install via a nested msi)?

A: It's really not possible to accomplish this in all scenarios. Nested installations are only available to products installed with the original install (through a nested install). Additionally, the FindRelatedProducts and RemoveExistingProducts actions only run on first-time installation so the upgrade table functionality can't be used. The Installer does not permit concurrent installation, so the only way you could accomplish this is through a custom action in the InstallUISequence table. This is similar to how InstallShield installs it's scripting engine. Of course, this has its drawbacks in that the InstallUISequence table isn't processed for basic UI and no UI.

Host: Chris (Microsoft)
Q: The MSIs don't give the "service could not be accessed", but they just sometime fail with internal errors not listed in the SDK help

A: Please check to see that you have the latest help file. All errors should be documented in the help file unless they are generated by a custom action. If your problem can't be solved there, I would follow up with a PSS case or in the public newsgroup.

Host: Mark (Microsoft)
Q: A little off-topic, but is anyone else having problems with MSDE SP3 merge module?

A: Hi All. The SQL Product team is aware of the problems incorporating the MSDE SP3 merge modules and is working to make sure they make a whitepaper available in the near future. Reference the following site for more information:

Guidance for Independent Software Vendors (ISVs) shipping MSDE with their products https://www.microsoft.com/sql/techinfo/administration/2000/security/isvswithmsdes.asp

Host: Carolyn (Microsoft)
Q: how does one check the version of the help file?

A: The latest available version of Windows Installer documentation is always online at MSDN.

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/windows_installer_start_page.asp.

And you can also download it from the Platform SDK. As for your current documentation, check the first page of the help and see what "Platform SDK Release: <Month Year>" states at the bottom.

Host: Carolyn (Microsoft)
Q: (To settle a dispute) From a call to MsiGetActiveDatbase(), is it possible to add temporary rows to an existing table? (That can be read from later actions. e.g. a new LaunchCondition.)

A: Yes, you can add new temporary rows to an existing table during an installation. As for whether or not they are available from later actions, you need to (1) make sure your custom action is sequenced before the action and (2) make sure the data remains in memory. In some cases, this may require that you add a HOLD count to the table so that it remains in memory long enough for the action that uses it. Otherwise, the data will be released when you drop your view on the table.

Host: Mark (Microsoft)
Q: Can I generate a patch from an msi generated through Component Services without using custom actions

A: I'm not completely familiar with the custom actions they use in the COM+ generated .msi packages, but I believe you mihgt be able to use a "Major" upgrade .msi package as opposed to a patch. You might want to double check with a COM+ engineer/

Host: Chris (Microsoft)
If you have additional questions that we did not get to today, please follow up in the Microsoft public newsgroups. Eric will be providing links to the newsgroups and the chat transcript in just a moment.

Moderator: Eric Sassaman (Microsoft)
Thanks for joining us today and thanks for the questions. You'll be able to find the transcript of this chat soon on <https://msdn.microsoft.com/chats/recent.asp> & Please see the chats schedule for upcoming topics. The newsgroup is located at microsoft.public.platformsdk.msi, please join us there. Or go to https://msdn.microsoft.com/newsgroups for our Web-based newsreader and a good list of developer newsgroups

Moderator: Eric Sassaman (Microsoft)
Also: https://msdn.microsoft.com/newsgroups/

Host: Chris (Microsoft)
Our next chat will be March 6th and will cover Assemblies. Members of the Assembly team at Microsoft will join us to provide their expertise.

For further information on this topic please visit the following:

Newsgroups: microsoft.public.platformsdk.msi

MSI Transcripts: Read the archive of past ISA chats.

Website: Visit the Microsoft Windows Installer site.

Top of pageTop of page