다음을 통해 공유


Windows Installer

Posted April 18, 2003

Chat Date: April 9, 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
  • Om, Program Manager on the Windows Installer Team
  • Yuan Qing, Test Lead 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, 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: YuanQing (Microsoft)
My name is YuanQing Ji, I am test lead for Windows Installer

Host: Om (Microsoft)
My name is Om Sharma. I am the Program Manager for the Windows Installer

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: How do I include the .NET redistributable in my vb.net setup app so when the user launches the setup it informs the users that the .net framework needs to be installed and runs the setup for the .net framework and then continues the install for my app.

A: As you might have discovered the .NET MSM is not capable of installing the framework. The framework is packaged as a stand-alone MSI -- therefore you need a bootstrap executable to install it and then your installation. Details on deployment of the framework can be found at: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/dotnetframedepguid.asp

Host: Chris (Microsoft)
Q: How secure are secure transforms? It looks like they are still installed in c:\windows\installer and are not protected.

A: Secure transforms are secure in the sense that they are protected against spoofing the transform by being cached in a secure location and with secure cache-replacement logic. They are not protected against examination by other users. This is something that we are looking at changing for the future, but fundamentally a user must be able to read the transform in order to repair the product.

Host: Carolyn (Microsoft)
Q: Please comment on the following wishes: Multiple progress bars; Cleanup folders left empty when locked files deleted on reboot; Allow [#table rimarykeylist] instead of just [#filekey] and [$conditionkey] in Formatted type; Allow formatted strings in C

A: Multiple progress bars is an issue we would like to address in the future (specifically reducing it to a single progress bar). Cleanup of folders left empty when locked files are deleted on reboot is a known issue that we are considering in a future release. As for the formatted text questions, can you provide more information about why you would like to see those specific formats and what you are trying to accomplish?

Host: Chris (Microsoft)
Q: What would cause Error 2356 Couldn't locate cabinet in stream: Data1.cab when applying a patch? What types of things should I look at in my install that might be causing this problem?

A: This error generally indicates that the specified CAB is not embedded in the MSI or is not available. The first step would be to verify that the CAB exists at the specified location and that the patch was created successfully. You can also get similar errors if the sequence numbers of any added or patched files conflict with an existing media table entry, causing MSI to look in the wrong cabinet for the file.

Host: YuanQing (Microsoft)
Q: Is the cabinet file actually embedded into the MSI package?

A: You can have cabinets embedded in the MSI package, or external to the MSI package.

Host: Carolyn (Microsoft)
Q: Has anyone implemented a custom sequence table? My efforts result in a 2761 because the WIS mutex is not properly initialized.

A: Custom sequence tables are successfully used. The Visual Studio .NET install uses a custom sequence table for initialization during the install (it's the InitializationSequence table) and controls the installation through external UI. The validation engine uses custom sequence tables to run the internal consistency evaluators (ICEs) as well. Perhaps part of the problem may be the method that you are trying to use to execute the custom sequence table.

Host: YuanQing (Microsoft)
Q: How can I verify all requirments softwares in launch condition without hard code the path?

A: You can use AppSearch to determinate software installation and set properties that can be used for LaunchCondition.

Host: Chris (Microsoft)
Q: (Secure Transform Followup) Chris I can change, replace and repair the transform I would say.

A: I'm not sure which copies you claim to be able to replace, but the ability to modify all MSI cached data or source locations depends greatly on the user rights and the type of install being performed, as well as the settings for various security policies on the machine. It is difficult to say whether you are seeing a problem or not. If you can provide details of your scenario, I would recommend following up on the MSI newsgroups or with PSS.

Host: Carolyn (Microsoft)
Q: In the help article, "Changing the Component Code" it is suggested that in the event of a new, non-compatible component, one must change not only the GUID, but also the name of the file. Is changing the file name really necessary?

A: You don't necessarily have to change the filename, but you should change the install location. If you want to know the ramifications, consult the "What happens if the component rules are broken?" topic.

Host: Chris (Microsoft)
Q: I keep getting an unknown/feature registry entry problem when installing on Win98 or WinMe. Could this be caused by being above 817 component entries in the MSI?

A: The limitation on Win9X is 817 components per feature, not 817 components overall, but yes, this is a possible cause of your problem. Reducing the number of components per feature would be an easy way to check if this is the case. By using (possibly hidden) child features, it is usually possible to create a set of features that can install the components with similar logic to having a single feature.

Host: Chris (Microsoft)
Q: Is it generally not possible to get access to your own token within a deferred CA during a silent install?

A: This is correct. A custom action runs with a privileged system token or with the user's token, but not both. This is a known limitation of the installer's custom action system.

Host: Carolyn (Microsoft)
Q: How do I get a shortcut created by the installer to NOT try to re-install the application on the end user's machine?

A: If you used a shortcut whose target was a feature, then you are using an advertisable shortcut. This means that the Installer will check the health of the components (via the component keypath) in the feature when the shortcut is invoked. If the component is broken, then the Installer will initiate a repair. If you don't want this health check to be performed, then use a non-advertised shortcut. You specify this using the Target column of the Shortcut table and using syntax like [#filekey]. Note that this means you won't get resiliency or install on-demand. Also, you can use the application event log to help track down why repairs are being initiated when you click on the shortcut. In some cases, package authoring may be contributing to the problem.

Host: Chris (Microsoft)
Q: I installed a 3rd party product to my PC from an MSI on CD. When I launch the Visual Basic IDE or any of my apps written in VB, the MSI installer is launched (multiple times). Do you have any idea what causes this or suggestions for correcting it?

A: This is generally caused by the 3rd-party product indicating in its "Class" table (or other advertise table) that it can provide a core COM object (such as the VB runtime, oleaut, etc) that is created when launching the VB IDE. The problem could also be related to the product providing a plug-in or other CLSID that is created by the IDE on each launch. If the product is authored in a way that it appears "broken" but can't fix itself via the auto repair, the product will remain eternally broken. You may be able to fix the problem by running a full repair of the application via Add\Remove programs. Details on what component is being requested and why it appears as broken can be found in the application event log.

Host: Chris (Microsoft)
Q: I understand the Windows 2000 SP4 and XP SP2 contain fixes for MSI that involve using the IsolatedComponents table. Is there an estimated release for these service packs?

A: Unfortunately, we cannot answer questions about unreleased products.

Host: Carolyn (Microsoft)
Q: When one sets the "e" attribute in the REINSTALLMODE property, the MsiFileHash table is ignored. Are there plans to fix this bug?

A: Actually, this isn't necessarily a bug. It sort of depends on how you look at the ‘e’ reinstall mode. 'e' means overwrite files if missing, older, or equal versions. If the file hashes match, the file is considered "equal" and therefore the overwrite can happen. The biggest problem is that given two unversioned files, you can't really determine which file is newer or older given the authoring of the MSI package. If the hashes differ, you know the two files are different. When you use 'o', you only want to overwrite files if missing or older. If the hashes match, then you have the file you need and hence don't need to copy it. For a versioned file, if the version matches, then you overwrite the file with 'e', but not with 'o'. Perhaps it will help to know why 'e' is being used as a common REINSTALLMODE option. Are you not updating versions in versioned files and therefore resort to 'e'?

Host: Chris (Microsoft)
Q: Is it possible for two .msi files to share cab files if the cab files are one-cab per component and the two installs have the same component names (though the component guids may be different)?

A: If the CAB file names are the same for both products (so that the cab can be found), and the file primary keys are the same for both products (so that the correct file can be found in the CAB), then yes, the files could theoretically be shared at the source location just by name collision, however MSI has no capability to share the CABs beyond that.

Host: Carolyn (Microsoft)
Q: does that mean my users have to install the .NET manually, I cant have it auto launch when the user clicks my setup for my app?

A: If you use a bootstrapper for your setup, then your user can just click on your setup executable. What will happen is the framework install will be performed first, followed by your setup installation. It's similar to what you would have to do if you needed to redistribute the Windows Installer with your setup. You would need to bootstrap the Installer redist with your setup in that case as well.

Host: Chris (Microsoft)
Q: Is there a way to convert an msm into an executable?

A: Microsoft does not provide any solution to do this. A MSM is not an installable object by itself, it must be merged into an MSI first. There may be other companies that provide solutions to this problem.

Host: YuanQing (Microsoft)
Q: Why is it that installing files to some of the per-user folders, such as AppDataFolder the components get registered on the system with a hardcoded path to that user's profile folder causing the MSI to repair for other users who attempt to the package.

A: That is why we recommend to use HKCU registry as a keypath for per-user component. WI has an ICE validate this and will give warning.

Host: Carolyn (Microsoft)
Q: I have an repackaged MSI install that I applied with a GPO, now every time I try to install an application locally on a workstation I get the windows installer for the gpo applied application, any ideas?

A: Repackaged applications are somewhat notorious for resulting in continued installer reinstalls. A lot of it depends on how the package was authored. Some of the newer repackaging tools have become much better at preventing this from happening. You can find out why installs/reinstalls are being invoked by analyzing your application event log. There are some tips for finding this out in the Windows Installer FAQ at https://www.microsoft.com/windows2000/community/centers/management/msi_faq.asp

Host: Chris (Microsoft)
Q: Is it possible to pre-stage large MSI files on a desktop before assigning them from the local hard disk?

A: This is an excellent question, but one that relates more to the software distribution technology than to MSI (a software installation solution). Once you can get the bits of the install onto the machine via the distribution technology of your choice, MSI would certainly be able to install from that location. You could then use the MsiSourceList* APIs to remove the temporary staging source and register the final source for use in future repairs. You should really follow up with your software distribution technology provider.

Host: Carolyn (Microsoft)
Q: I feel that setting up a SQL Server database is a very common setup activity and it has been glossed over - there is support for very isoteric installation tasks but not running SQL/DDL!

A: Native support in the Windows Installer for configuring SQL server databases is under consideration for a future release. You can certainly use custom actions to handle this setup activity. Some of the more recent versions of the more complex authoring tools are now providing support for this (still through custom actions), but have simplified how you accomplish it.

Host: Chris (Microsoft)
Q: Regarding the 817 components/feature limitation on Win9x: Is that 817 *installed* components or 817 total? If I have conditional components which brings the installed # to less than 817, will I be safe?

A: No, you won't be safe. The limitation is 817 components associated to the feature via the FeatureComponents table. The state of the component is not relevant.

Host: Carolyn (Microsoft)
Q: I need to create a custom action of type 7 in a merge module. Is this possible? And how do I update the substorage so that it will contain the nested msi package.

A: This isn't really possible given the current merge tools since they don't handle movement of substorages from the MSM to the MSI. Additionally, I would add that use of nested installs is not really recommended given the problems they pose and the fact there are limitations to how they can be managed and updated.

Host: YuanQing (Microsoft)
Q: Why does the msi leave files behind in the Windows Installer directory even after the product has been uninstalled?

A: Windows Installer will cleanup all temp files after uninstall. Some files are hold for use during uninstall and will be marked for deletion after next reboot.

Host: Chris (Microsoft)
Q: Why is FilesInUse dialog not shown if the file in use does not have associated window (e.g. a browser plug-in)?

A: We have found that if the process holding the file does not have a window, users usually do not know how to shut down the process. Additionally,, without a window title, MSI does not have a reasonable way to indicate to the user which process needs to be shut down. Plug-ins are an interesting issue which we are looking at more, but it is usually difficult to determine which window needs to be closed in Internet Explorer to release the plug-in.

Host: YuanQing (Microsoft)
Q: They seem to be there even after a reboot. Could this be an Install Shield thing?

A: I don't think InstallShield creates any files in Windows\Installer folder. All files there should be part of Windows Installer. What files do you observed left behind?

Host: Chris (Microsoft)
Q: Chris, is it allowed to use a GPO that's point to c:

A: You should follow up with the Group Policy team. Unfortunately the members of this chat are not experts on Group Policy.

Host: Carolyn (Microsoft)
Q: thanks for the reference about the consequences of not changing file name or location. Would a reasonable practice be to install the application to a top level directory such as: \Version001 and then increment it by one each time an incompatible installation is issued?

A: This is certainly possible and should technically work. Note that you may also have to be concerned with COM registration because you wouldn't want the incompatible versions to be sharing the same COM registration.

Host: YuanQing (Microsoft)
Q: They have randomly generated names and when you hover over it with a mouse it says a product description. The files are as big as the original msi.

A: That must be cached msi file. Sometime if a CA has leaked handle or such, it will hold cached msi file such that it will not be able to delete after uninstall.

Host: Chris (Microsoft)
Q: It seems that repairing at the feature level vs. the component level can be quite excessive. Are there any plans to change this behavior?

A: Yes, this is a very expensive behavior, and we recognize that. We can't really talk about future plans at this point, but we hope to be making some strides in this area in our next version. One problem is that many applications actually rely on this behavior to perform correct repairs of their product.

Host: Carolyn (Microsoft)
Q: where can I ask questions specific to group policy and Intellimirror?

A: You can post your questions relating to group policy to the group policy newsgroup at news://msnews.microsoft.com/microsoft.public.windows.group_policy.

Host: YuanQing (Microsoft)
Q: Has this been an issue in InstallShield Developer? We don't use our own custom actions.

A: Not that I am aware of. You should follow up with InstallShield to get a better understanding.

Host: Chris (Microsoft)
Q: when will Microsoft release msi 3.0

A: Final release dates have not been set. More information will be provided as the dates are finalized.

Host: Carolyn (Microsoft)
Q: I understand the value in 'install on-demand' with MSI files, but it does not apply to our environment (i.e users cannot install under their ID) I do not understand what using a 'non-advertised shortcut' means??? I cannot type in the Target column and do not see how to enter #filekey

A: Do you have control over the package itself? If so, you can edit the package in Orca (a tool provided with the Windows Installer SDK). When you want to create a shortcut to a file, you can specify in the Target column of the Shortcut table the [#filekey] reference where 'filekey' refers to a row in your File table. When the installer installs that shortcut, it will create the shortcut to the file that matches that File table key. If you don't have control over the package, you could specify the property DISABLEADVTSHORTCUTS and set it to 1. This will cause all of the shortcuts to be created as non-advertisable shortcuts (regardless of how they were authored). Consult the MSDN documentation for more information on this property.

Host: Carolyn (Microsoft)
Q: Is the recommended way to setup a database to run VBScript via Custom Action?

A: You will have to accomplish this using a custom action. Your choice of custom action (DLL, VBScript, EXE) depends on your familiarity with each. You can accomplish the same things with DLL and VBScript custom actions. The other recommendation I would have is to try and maintain a data driven approach. For example, there's a sample in the Windows Installer SDK (and documented in MSDN) for how to create local user accounts that uses a custom table and immediate, deferred, and rollback custom actions to handle this. That example should provide a good overview of how to achieve the data driven model.

Host: Chris (Microsoft)
Q: I asked earlier about getting debugger to show custom action source; the dll is a debug build but debugger just shows disassembly at MsiBreak

A: When MsiBreak fires, you are actually at a breakpoint immediately before the entry point to your custom action DLL is called (but after the DLL is loaded). If you perform a "step into" action a few times (however your debugger does that) you should be able to step into the DLL and see the source. If the debugger is not loading the source to your DLL, verify that the symbols have been loaded correctly for your DLL, and that the symbols contain the correct source paths. (You could also try loading the source into the debugger ahead of time if the path is wrong in the symbols)

Host: Carolyn (Microsoft)
Q: But so long as the GUIDs are changed the installation would not "share the same COM registration" would it?

A: No. COM registration is based on CLSID. So you'd need to change the class identifier as well; otherwise they would share the same class registration.

Host: Chris (Microsoft)
Q: How do I implement a custom sequence table? When I try it fails on InstallInitialize.

A: Even when using a custom sequence table, certain actions are required to happen in a sequence table since they set up internal state for later actions. These sequencing restrictions are documented in the SDK. Other actions can only happen from the secure MSI service. InstallInitialize, which begins the actual installation script, can not be run outside the MSI service.

Host: Chris (Microsoft)
Q: Is there documentation somewhere on the future direction of MSI?

A: There was a post to the MSI newsgroups which summarized the discussion of MSI 3.0 which was held in the February chat. You should be able to find that post in the newsgroup archives. At this point in time, Microsoft has not released any additional information about MSI 3.0. We will be providing more details as we prepare for the Beta release of MSI 3.0.

Host: Chris (Microsoft)
Q: the msi doc does not have examples for complus table.

A: I will pass this request along to the doc team.

Host: Carolyn (Microsoft)
Q: Do you have control over the package itself? I am using a .net setup project. I am a newbie to this environment and some of the terminology is a bit different. I don't understand the row concept in the file table?? Thanks for patience

A: VSI hides away the MSI file in an attempt to simplify the authoring environment. When you build a setup project in VSI, you will have an MSI file that is generated. You can then use a tool like Orca to edit the .MSI file to make changes. My experience with VSI is limited (since I generally use Orca), but on a cursory glance it doesn't appear that you can configure the shortcut to just be a regular shortcut rather than an advertisable one. (It might be possible and I don't know how though).

Host: Chris (Microsoft)
Q: How can I sign up for the 3.0 beta?

A: The details on the 3.0 beta have not been finalized, more information will be provided soon.

Host: Carolyn (Microsoft)
Q: Which Windows installer table do I go to to alter the CLSID

A: That would be the Class table. Note that you also need to make sure that your COM component will still work when you edit that.

Host: Chris (Microsoft)
Q: When is the beta release of MSI 3.0 targeted for?

A: The beta is currently planned for summer of this year, but exact dates have not been set and the plans may change.

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 and we'll try to get you an answer:

for developer questions,

for end-user/administrator questions

Moderator: Eric (Microsoft)
Thanks for coming and we hope to see all of you next time!

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