다음을 통해 공유


Windows Installer

Posted June 14, 2003

Chat Date: June 5, 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
  • YuanQing, Test Lead on the Windows Installer Team
  • Hemchander, Developer 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 (general). Questions, comments, and suggestions are welcome. Let's introduce our hosts for today!

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.

Host: Carolyn (Microsoft)
Hello! I'm Carolyn, a developer on the Windows Installer team that specializes in patching and upgrades among other things. In just a few weeks I will have reached my four year milestone with the Windows Installer team. It's hard to believe this is the 10th Windows Installer chat!

Host: YuanQing (Microsoft)
This is YuanQing Ji, test lead of Windows Installer team.

Host: Henchander (Microsoft)
Hi, I am Hemchander, a developer on the Windows Installer Team. My areas of focus include installer performance and patching.

Host: Om (Microsoft)
Hi,I am Om Sharma, PM for the Windows Installer.

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

Host: YuanQing (Microsoft)
Q: There are many ICE validation rules to follow. Does Microsoft (or some other company) have a list of the more important ones to follow when packaging applications?

A: We do have validation sets for Windows 2000 and Windows XP logo program. But the recommendation is to run and pass full validation set in order to ensure your package works correctly.

Host: Chris (Microsoft)
Q: Merge module: want to add a registry entry that includes the module ID. is there a property that exposes the module ID?

A: The ModuleID is stored in the ModuleSignature table, but is not exposed natively as a property (since multiple modules can be merged into a single database). You can expose the ModuleID as a property if you would like by simply adding a property to the Property table of your MSM. It will then be merged into the target product and available as a regular property.

Host: Carolyn (Microsoft)
Q: Can you get the windows installer to install Sql Server objects and install them in the correct order for the database

A: The Windows Installer currently does not provide native support for installation of Sql Server objects. However you can accomplish this using the custom action functionality where you write custom code. With custom actions you also have control over when they are executed so you can sequence them in the order you want. You'll probably want to use a data driven approach where you store your data in a database table that your custom action reads.

Host: YuanQing (Microsoft)
Q: Conditional install of shortcuts. When I create a shortcut of my app, it does not have a condition property. So, how can I conditionalize whether a user wants a desktop shortcut, etc.

A: There are several ways you can do this. One is set a condition on the CreateShortcut action. This will turn on or off all shortcuts creation. You can have a component that just contains the shortcut and set a condition on this component. (The component condition method would be the preferred method.)

Host: Carolyn (Microsoft)
Q: I have a problem when I tried to use Windows Installer .NET to deploy my project. It seems that I cannot add any support files/registry values. As soon as the user changes something, the next time s/he start the program, the Windows Installer kicks in.

A: VS .NET should allow you to add files and registry keys/values to your installation package. If you are having problems where after installation the Installer kicks in every time you click on a shortcut, the first troubleshooting step would be to check the Application Event Log. The Installer will indicate what component is failing detection and causing the repair. With MSI 2.0, it will even indicate the resource. With this information, you can analyze verbose log files and your package to determine why this resource isn't getting installed.

Host: Chris (Microsoft)
Q: How about using all 4 fields of the version identifier for identifying products to upgrade in the upgrade table?

A: MSI only uses the first 3 fields of product versions when performing product comparisons. You can change the fourth field as often as you like and it will still match the same condition.

Host: Henchander (Microsoft)
Q: How can I add a file/registry value in the installation package but when the user change it, the windows Installer should not re-install the application?

A: What you mean by this is that this file/registry resource is not critical for you. In this case, do not make these resources key paths of any components. That way, changing this resource will not kick in any repair.

Host: Carolyn (Microsoft)
Q: The question on database installs is when I am doing all my database work in .Net IDE

A: As you have probably realized, the VS .NET IDE for creating setup packages provides a limited feature set. You can add certain types of custom actions (always deferred), but in this case, you'll probably want to use another editor (like Orca), authoring tool, or other MSI tools to add this data. With the post-build step in VSI, you could automate this with a batch file or script after you designed it.

Host: Carolyn (Microsoft)
Q: Will the installer ever be modified to handle Database installs, like in Yukon?

A: This is definitely a feature under consideration for a future release of the Windows Installer.

Host: Chris (Microsoft)
Q: So, we just leave the ICE33 warnings in there. Anything wrong with that as long as we know the limitations?

A: In general, validation results are classified as either ERRORs or WARNINGs. ERRORs should always be fixed, they indicate problems with the package. WARNINGs are issues that are usually problems, but if you understand why the warning is being generated, what the potential problem is, and are satisfied that you are happy with the behavior, you may choose to ignore the validation WARNINGs.

Host: Chris (Microsoft)
Q: In regards to the version property. Is there any plans to expand it to using the 4th column in the next MSI release?

A: There are no plans to change this behavior.

Host: Carolyn (Microsoft)
Q: How can I make the merge module installed based on a condition (e.g. user response)?

A: A merge module contains one or more components. Components can be conditioned individually so that they install or don't install based upon the evaluation of the condition.

Host: Carolyn (Microsoft)
Q: For conditional features, if a feature is installed, but the condition evaluates to 0 during uninstall, the feature is left behind--orphaned. Wouldn't it make sense to remove all installed features regardless of condition if REMOVE=ALL?

A: You are correct about the behavior. It's an interesting suggestion in that the Installer could try and account for this case on full product uninstalls. I'll forward the suggestion on to the product team. In the meantime, you should ensure that your authoring of the Condition table won't result in this situation. This issue is noted in the documentation for the Condition table.

Host: Carolyn (Microsoft)
Q: What is the best mechanism to deliver MSDE 2000?

A: The answer here can somewhat depend on what you mean by deliver. Is this in reference to shipping MSDE 2000 with your application or to deployment of MSDE 2000 with your desktop? If it's the former, the recommended practice is to use the MSDE MSI file (and not the MSMs) since this allows for servicing of MSDE.

Host: Chris (Microsoft)
Q: My WIN XP Pro v2.0 installer is corrupted. Where/how do I find the installer 2.0 to update/correct my corrupted version.

A: On Windows XP, the installer is a part of the OS and is not available as an independent redist. If you are having problems with the installer, you can follow the steps described in KB article 315346. (HTML link follows: https://support.microsoft.com/?kbid=315346

Host: Carolyn (Microsoft)
Q: how can I programmatically set the "Display Name" and the "Description" of all the features in the run time.

A: This isn't possible at run time unless the features were dynamically populated into the Feature table (using InsertTemporary). You cannot update data stored in persistent rows in the database during an installation. These columns also are not treated as formatted columns so you can't use properties to represent them and have the properties resolved. Therefore, you would only be able to alter the Display Name and Description of features that you add dynamically at runtime.

Host: Carolyn (Microsoft)
Q: Do I have to include all 16 .msi files? We control the platform for our customers so can we just include sqlrun01.msi

A: No, the 16 MSI files represent the 16 different instances for SQL MSDE. You'll only need one instance for your application. You might consider reviewing the following information on MSDN:

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmsde/html/msderoadmap.asp

Host: Chris (Microsoft)
Q: I have been able to launch an install though VBScript on a web page, but it requires that the user allow ActiveX on the page and set the page as a trusted site. Are there any ways to launch an install in this manner without having to open up the security settings in this way? Like signed files, etc?

A: Natively, the MSI only provides the "SafeForScripting" policy, which is much like the policies you mention in that it is a dangerous policy. MSI does integrate with the "Software Restriction Policies" feature of the OS which can be used to block installs that do not meet certain source, hash, or signature requirements, but this is not specific to VBScripts. The SDK includes a sample "setup.exe" (source code) that can be used as the URL target to verify signatures of the MSI file before launching the install as well. Keep in mind that none of these solutions address the limitations of installing products for limited-rights user. That is a distinct problem from the VB\web prompting problem.

Host: Chris (Microsoft)
Q: Can I use the same User Interface Dialog more than once? If not, how can I build a custom dialog?

A: MSI supports complex dialog sequences and custom dialogs through the Dialog, Control, ControlEvent, and associated tables in the MSI file. How you would actually create and link these dialogs in your setup depends greatly on your authoring environment. Those questions would best be asked of experts in your authoring environment rather than the native MSI engine.

Host: Carolyn (Microsoft)
Q: Installer in XP Pro does a full uninstall of MS Word when ever a new application is installed. Help?

A: This seems a bit strange. Is the new application a MSI-based application? In general one product shouldn't be affecting the other product unless it's a major upgrade or it affects components shared between the two. The first step in troubleshooting would be to check the application event log for MsiInstaller related events. This will tell you what install transactions the Installer has performed. From there, you might get a clue as to what is triggering the problem. Going further, you can enable verbose logging which will document everything the Installer is doing during the installation. This should hopefully give some insight as to what is going on. For enabling logging, consult

https://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b223300

Host: Henchander (Microsoft)
Q: Can you can a .bat file in the installer?

A: You can run a batch file while installation is in progress by running it as a Custom Action.

Host: Carolyn (Microsoft)
Q: So basically I have obtain other authoring tools other than the one provided (e.g. VS .NET), right?

A: A lot depends on the features that you require. VS .NET provides a very limited authoring environment. For things that VS .NET can't do, you could use Orca (which is free in the Windows Installer SDK) or a different authoring tool. https://www.installsite.org provides a good overview of the feature sets. Additionally, you can use the postbuild step feature in VS .NET if you want to make sure your customizations are always included when you build your setup project.

Host: Om (Microsoft)
Q: Is the beta for msi 3.0 ready?

A: MSI30 is still under development. The Beta1 release is scheduled for Mid August 2003. More information about the Beta and participation guidelines will be posted to the MSI newsgroups.

Host: Chris (Microsoft)
Q: Any chance that the next version of msi would support dde apps through the extension/MIME/progid tables?

A: I am not aware of any specific plans for DDE support (I am not overly familiar with that technology or why our current support is insufficient) but I will pass your suggestion on to the people working on plans for the future for more research.

Host: Carolyn (Microsoft)
Q: How do mm determine when to upgrade components - Version field in ModuleSignature table or ProductVersion.MMID property?

A: MSMs don't make that determination as they cannot be installed as stand-alone entities. MSMs are simply a packaging format. The version field in the ModuleSignature table is used so that when given two merge modules, you know which one is newer. Once your application consumes the MSM, whether or not files are updated are based upon the file versioning rules. Components are evaluated using the keypath of the component which provides the "versioning" of the component.

Host: Carolyn (Microsoft)
Q: Regarding the MS Word full uninstall performed by the XP Pro installer - doesn't matter if it's an MS app or not - on-going problem with no relief in sight - highly annoying

A: What is your indication that Word is uninstalled? The shortcuts and files are removed? The application is removed from Add/Remove programs? I'd suggest beginning with the troubleshooting steps to see if more diagnostic information can be obtained. If you are still having problems, you may want to collect the diagnostic information and then provide that information to the microsoft.public.platformsdk.msi newsgroup.

Host: Chris (Microsoft)
Q: So are the two version fields only for our own reference or are they used by the windows installer?

A: Version information in the ModuleSignature table is for authoring-time use only. Validators and merge tools use it for dependency satisfaction checks, etc. The versions are not used at install time.

Host: Carolyn (Microsoft)
Q: Hello i'd like to ask about whether future windows installer version will support direct installation of COM+ dlls

A: There is native support in the Installer for installation of COM+ DLLs. Is your question more related to how to author this functionality? In essence, is it related to the fact that you use the COM+ export utility to collect this information.

Host: Carolyn (Microsoft)
Q: Well till now I’m using component services and then I nest my msi…

A: Okay, then it's not the fact that Installer doesn't provide the support -- it's that component services provides you with an MSI that you nest. There's nothing to prevent you from taking the generated MSI and copying the data into your MSI so that you don't have to use a nested install. Perhaps a suggestion from this is that component services could create a MSM that you consume into your MSI instead of a nested MSI. But there's native support from MSI for installing COM+.

Host: Chris (Microsoft)
Q: I have also detected that patches which are major upgrades tend to not work did you have any feedback on this?

A: We have received feedback that there are some problems with major upgrade patches, and we are investigating these reports. I would recommend using patches for minor and small updates, and sticking with full upgrade packages for major upgrades.

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, and

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

For further information on this topic please visit the following:

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