다음을 통해 공유


MSI Chat - General Discussion

Posted March 20, 2004

Chat Date: March 9, 2004

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

Introduction

Moderator: Eric_S (Microsoft)
Welcome to today's Chat. Our topic is MSI Chat - General Discussion. Questions, comments, and suggestions are welcome.

Moderator: Eric_S (Microsoft)
We will make an effort to answer as many questions as we can. There may be times when a question may be asked that we do not have an immediate answer for or cannot get to. We encourage you to post any of these questions in the MSI newsgroup at news://msnews.microsoft.com/microsoft.public.platformsdk.msi.

Moderator: Eric_S (Microsoft)
Let's introduce our hosts for today!

Host: Carolyn (Microsoft)
Hello! I'm Carolyn, a developer on the Windows Installer team. I look forward to chatting with you all today.

Host: Rahul (Microsoft)
Hello and welcome. I am Rahul Thombre. I am the development lead for Windows Installer.

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

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

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

Host: Eugen (Microsoft)
Hello! I'm Eugen, a developer on the Windows Installer team. I'm looking forward to answer your questions.

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

Start of Chat

Host: OmSharma (Microsoft)
Q: Some weeks ago I posted a lot of (unanswered) questions in the 3.0 Beta Chat. Where can I find the answers (URL)?
A: We are not taking questions related to the MSI30 Beta program at this chat. However, instructions on how to access the chat transcript will be posted to the betaplace newsgroups.

Host: Carolyn (Microsoft)
Q: We update our .exe frequently and would like rollout patches for existing installs along with full installs. When a delta is created as part of a patch, is it just the bytes that have changed within the file or is the full file replaced?
A: Depends on how you author your Patch Creation Properties (PCP) file. You can have it so that you always create a full-file update for all files or on a per-file basis. If you don't specify that, patchwiz will choose the smallest of the two: full-file or delta. The delta is simply that. It contains data that describe the difference between the files. With a delta, the file on disk must have been one of the files used to create the delta.

Host: Carolyn (Microsoft)
Q: I am trying to install downloaded software and get the following error message: Isscript.msi is missing from this machine. Please install isscript.msi, or contact your support personnel for further assistance. I have tried everything to fix this problem.
A: ISScript.msi is the installation package for installing the InstallShield scripting engine. Apparently the software requires this to be installed (perhaps it uses InstallShield script in its setup). I'd recommend reviewing information at https://support.installshield.com.

Moderator: Eric_S (Microsoft)
Hello. For those just joining the chat - Our topic is MSI Chat - General Discussion. Questions, comments and suggestions are welcome.

Host: Hem (Microsoft)
Q: Where can I find the list of error codes that are generated by Msimsp.exe?
A: MsiMsp ends up calling the PatchWiz.Dll's UiCreatePatchPackage() API. The error value returned by this API is the error code that MSiMsp returns. For a list of error codes that this API returns check: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/return_values_for_uicreatepatchpackage.asp

Host: Rahul (Microsoft)
Q: Why is the functionality for creating patches contained in an external DLL (PatchWiz.dll) when this is really core functionality of the Windows Installer Subsystem. Should this functionality not be included in the MSI API?
A: It is just a question of how the functionality is split. The primary function of core MSI is installation and servicing of apps on the client. The creation of patches falls more under the purview of tools and hence the split.

Host: Carolyn (Microsoft)
Q: Does the MSI file version checks support VB file version schemes when creating a patch? VB always has versions like 2.3.0.155 and the MSI documentation says that MSI only recognizes the first three version numbers
A: Yes. There are two different types of versions that MSI uses: FileVersion and ProductVersion. The Installer respects all four fields of the FileVersion. For ProductVersion, the Installer only considers the first three fields. So your file version is fine.

Host: OmSharma (Microsoft)
Q: Recently Microsoft has been stating that MSMs are not to be used for
A: MSMs have well known servicing issues. The MSM publisher cannot update or patch the MSM without the participation of each consumer of the MSM. The use of MSMs as a vehicle for shared redistributable setup creates many logistical hurdles for servicing. MSMs for use in products where you don’t have clear servicing contracts may hamper your ability to ship updates. Use with caution!

Host: Rahul (Microsoft)
Q: I want to give my .net apps the ability to install on-demand, like Office 2003, for that I need "managed" access to the installer API, so when I will see the installer assembly?
A: Currently there is no native managed interface for the Installer APIs. This is under consideration for a future release of MSI.

Host: Carolyn (Microsoft)
Q: What's the best way for initiating a custom action ever time a user clicks a managed/advertised shortcut?
A: There's really no way to do this. For a managed/advertised shortcut, the only time an install transaction will be invoked is if the health check fails (keypath of the component is missing). In that case, the feature is installed and the InstallExecuteSequence table is processed -- which would thus permit the execution of the custom action. You could also tie the custom action to run based upon a specific component action state.

Host: Carolyn (Microsoft)
Q: my .msp files don't run in elevated mode but .msi works any idea??
A: The elevation state of the MSP is controlled by the elevation state of the product. The MSP does not control its own elevation. When the MSP is applied to a managed product (per-machine or per-user managed), it will run elevated using the "blessed" privileges of the product. When the MSP is applied to a non-managed product (per-user), it will run with the privileges of the user performing the install.

Host: Hem (Microsoft)
Q: any way to allow users to uninstall packages previously installed as nested installations of another package?
A: Nope. A package nested installed in the context of the parent product can be uninstalled only in its parent product context.

Host: Carolyn (Microsoft)
Q: For an .MSI, MSDN states that the template Summary language property must be the same as the ProductLanguage property. However, if you use a language transform for localization - it cannot change the Summary stream! What is the best way to handle this?
A: In that situation it is generally ok as this is the recommended method for multi-language installs. There are a few issues when the summary info language and ProductLanguage differ when it pertains to basic UI. More enhanced support for multiple language installs is something under consideration in a future release of MSI.

Host: OmSharma (Microsoft)
Q: Is there a way to change the permissions of a file copied in Program Files folder from a setup program generated by VSI ?
A: MSI provides support for this through the lock permissions table (https://msdn.microsoft.com/library/en-us/msi/setup/lockpermissions_table.asp)I am not sure if the VSI tool exposes the lock permissions table. If not you can use the orca database editing tool (included in MSI SDK) to add support for the lock permissions table

Host: KenWong (Microsoft)
Q: I have a directory in one of my install packages that gets created as the INSTALLDIR. On an uninstall it fails to remove the directory but there is nothing in it. Is there some way I can tell the directory to always delete on an uninstall?
A: Check to see the folder does not exist in the registry location HKLM\SoftWare\Microsoft\Windows\CurrentVersion\Installer\Folders. You could explicitly remove an empty folder on uninstall with the RemoveFolder Table.

Host: Rahul (Microsoft)
Q: So if I am authoring a patch that will update multiple versions, can I just use an early install to delta against, and make sure I include the correct list of versions I want to update?
A: If you use a tool like patchwiz, you have the ability to specify multiple target images and a single update image. Creating the delta patch in this manner will ensure that the right transforms are created in the patch for the different versions.

Host: Carolyn (Microsoft)
Q: Actually MSI 3.0 beta 2 does not support multiple instances of the installer service running in parallel, thus limiting us to install more programs at the same time, please address that.
A: We aren't answering questions concerning the Beta in this chat. However, MSI in general does not support multiple install transactions executing in the Windows Installer service at the same time. There are a number of architectural reasons for that, especially when it comes to ensuring that installs are transactional in nature and that proper rollback would happen when an installation fails. This may be considered in a future release, but until then you have to queue installs one after the other.

Host: OmSharma (Microsoft)
Q: Is there a way to disable the auto-repair function of an installation?
A: It is not possible to specifically disable the auto-repair function of a particular application. However you can disable the MSI service (https://msdn.microsoft.com/library/en-us/msi/setup/disablemsi.asp) through group policy and prevent installs, repair, reinstall and install-on demand

Host: Rahul (Microsoft)
Q: Patchwiz? Is that a MS tool? I use VS installer currently
A: Yes, patchwiz.dll and msimsp.exe are tools that ship with the MSI SDK.

Host: Carolyn (Microsoft)
Q: Is there a way for an administrator to install a program only for a particular (non admin) user ?
A: Yes. This would be what's called a per-user managed installation. This is already supported in Group Policy-Software Deployment via user-assign and user-publishing of applications. The method for accomplishing this is to first create an advertise script using the MsiAdvertiseProduct API specifying szScriptfilePath to be a path to an actual script. A process running as local_system then impersonates the user (the non-admin user) and calls MsiAdvertiseScript providing the script file and the set of flags indicating which data to advertise.

Host: Rahul (Microsoft)
Q: how would you recommend handling a network deployment of an application that is initially delivered via msi and then requires a non-msi/p patch be applied (.exe)?
A: It really depends. My first question would be why an msp is not used for patching. If you use a non-MSI/p patch, MSI will have no knowledge of the patch and you could inadvertently end up reverting your patch in repair scenarios.

Host: Carolyn (Microsoft)
Q: What is the advantage of using the tables ProgID, Class and Typelib instead of using registry keys to register a COM DLL? Advertising is an advantage but is self-repair also more sophisticated?
A: For one, they can be easier to author than using the Registry table directly (although if you already have them in Registry format you may disagree). Advertising is on-demand install. Both on-demand install and self-repair use the same architecture as they both rely upon the presence of the keyfile of a component to determine whether an install transaction is triggered. So you get both for "free" when you use those tables. Authoring directly in the Registry table bypasses this so you won't have any auto-resiliency or on-demand installation when your CLSID is invoked.

Host: OmSharma (Microsoft)
Q: Who do I contact regarding redistribution of PatchWiz.dll. Someone within this group or is there a department at MS dealing with this type of thing?
A: PatchWiz.dll is distributed as part of the SDK. There is no support for redistributing individual components of the SDK.

Host: Carolyn (Microsoft)
Q: Components removal is not actually supported, but what could happen if I do it?
A: What could happen is non-deterministic. But in short, you may not have appropriate small/minor upgrade or patch behavior. Features may not be updated correctly so that the files belonging to components of the feature are not updated to the versions expected by the update. Additionally, you can end up orphaning resources on uninstall because there is no longer a record of the component in the package.

Host: KenWong (Microsoft)
Q: Do you always have to keep full source files around for every version even if you are only generating patches for one file (the exe)?
A: Within the PCP file, you could set the IgnoreMissingSrcFiles to a non zero value. By setting this value, files missing from the target image are ignored by the installer and left unchanged during patching. This enables patches to be made without requiring the entire image

Host: Rahul (Microsoft)
Q: I have a group of installs that are all standalone applications but can be installed with each other and share some files. during an uninstall some of these files get removed breaking the other apps installed on the system. How do I prevent these files from being removed.
A: If the shared files belong to the same component, i.e., same component ID used in the different standalone applications, then you will be fine. Of course, you will also need to ensure that the contents of the shared components are identical across

Host: Rahul (Microsoft)
A: all the applications that share that component.

Host: Carolyn (Microsoft)
Q: Is there any information (anywhere) about the creation/format of the typical Windows Installer Shortcut (the advertised flavour)?
A: When you right click on the "advertised" shortcut you'll notice that shortcut target is grayed out. The actual format is not documented, but the following KB article provides information on how the shortcut works: https://support.microsoft.com/default.aspx?scid=kb;en-us;243630.

Host: OmSharma (Microsoft)
Q: Is MSI still going to be the recommended way to distribute applications under Longhorn. I know ClickOnce is a really dumbed-down installer technology but are MS expecting most LongHorn apps to be ClickOnce installable?
A: Longhorn will have complete support for MSI. Microsoft is standardizing on two installers company wide - Update.exe for hotfixes/SP to OS components and MSI for applications. MSI will continue to play a critical role for application packaging in the foreseeable future.

Host: Carolyn (Microsoft)
Q: Carolyn: So this has to be managed in the msi file and is not applicable to all setup files, hasn't it ?
A: An MSI file is incapable of elevating its own privileges. There would be major security implications if it could. Whether or not an installation will run with elevated privileges requires the blessing of an administrator. There are software distribution tools like Group Policy - Software Deployment and SMS that make this easier for admins to perform these types of operations. The Windows Installer documentation on MSDN: "How do I install a package with elevated privileges as a non-admin?" provides more information.

Host: KenWong (Microsoft)
Q: If a create an installation, then I *manually* update some files on pc (with newer versions, eg. from v1 to v2) then I create a new installation with these files at v3, if I make a patch between the 2 installations the v3 of the file will be installed?
A: Since V3 has a higher file version than V2, V3 will always be installed. However, source will be required if the patch in question is a delta compression patch between files V1 and V3.

Host: Rahul (Microsoft)
Q: How to refer to standard accounts (eg Administrator) in a localized setup program that has to modify the LockPermission table ?
A: With Windows Installer version 2.0 or later, the common user names "Everyone," and "Administrators" may be entered in English and are mapped to Well-Known SIDs. For other accounts, you will have to use a custom action.

Host: Eugen (Microsoft)
Q: Is it possible to call a function in a .NET assembly from a custom action?
A: You need to use the InstallUtil wrapper in Visual Studio for this. Also, if the assembly is just being installed, then you need to use either commit custom action or a custom action that is scheduled after InstallFinalize..

Host: Carolyn (Microsoft)
Q: Followup on lang tranforms not able to change the summary lang 1.) when using lang transforms, what IS the recommended value for summary lang - 0? 2.) what effect does these two different lang props have while installing (what does each control)?
A: The recommendation for the summary information language property is that it should match the ProductLanguage value of the base package. ProductLanguage is what is registered as the language of the product and is what is queryable from the Installer's configuration data. The SummaryInformation language is used in basic UI to determine the language of the buttons and strings. There are plans to offer improved support for multiple language installs (with full guidelines) in a future version of the Installer.

Host: Carolyn (Microsoft)
Q: We are installing a service in the INSTALLDIR directory. If INSTALLDIR is changed using the DestinationFolder dialog then the service will not run with an error that it is not a valid Win32 application.
A: There is a known issue relating to Windows Installer installation of services where the binary path of the service is not quoted if it contains a space. When installing services the binary path of the service should be quoted if it contains a space. If that doesn't happen, then the service that is started starts at (considering a service in c:\Program Files\Service\serice.exe) "c:\program.exe" followed then by "c:\program files\service\service.exe". Your customer probably has a file called program.exe at the root of the drive. This issue is fixed in the upcoming MSI 3.0 release. Until then you can use a custom action to alter the service binary path to include quotes or use the Registry table directly if the WriteRegistryValues standard action is sequenced after InstallServices.

Host: Rahul (Microsoft)
Q: re: Carolyn_Microsoft's answer to Shortcut stuff. Thanks. The reason I am asking is that this triplet of information contains only a single product reference. As a result, if two or more products share the same shortcut location only one product has ownership of the shortcut. The result is that the "owner" product will remove the advertised shortcut on its removal. I'd like to try to workaround this even though it is a shell problem (or rather a design problem).
A: Well, the shortcut is really just an invocation entry point for a particular app. So if you have two apps that use the same shortcut location and name, the last writer will win. The right thing to do is to have a separate shortcut for each app.

Host: Carolyn (Microsoft)
Q: The LockPermission table can be used to change the permissions on an installed file. Is it possible to change those permissions from a VSI setup program ?
A: Visual Studio Installer is a limited authoring tool. It provides a subset of the functionality included in Windows Installer. To do more advanced things, you may need to use Orca in conjunction with VSI or switch to a more heavy-weight authoring tool like InstallShield, Wise, etc. The site https://www.installsite.org offers a comparison of various authoring tools that are available.

Host: Carolyn (Microsoft)
Q: Is it possible to overwrite the unversioned files (eg. .txt files) which creation date is different from last changes date?
A: Not by default per the Windows Installer file versioning rules. There are alternatives though. Use companion file versioning for your unverisoned file. Or use the RemoveFile table to always remove the unversioned file before you install it. In that way, there won't be a modified file there to prevent the copy. You should only do this in cases where you don't expect to preserve user data since the consideration made by the Installer is that a modified unversioned file contains user-specific changes.

Moderator: Eric_S (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:

Newsgroups: microsoft.public.platformsdk.msi

VB .NET Transcripts: Read the archive of past MSI chats.

Website: Visit the Management Technologies Community Center site.

Website: Visit the Microsoft Windows Installer site.

Top of pageTop of page