Posts

Showing posts with the label Application Packaging

Packaging Skype with Auto Update disabled

EDITED: I have edited this post on 30-Aug-2013 after some users comments that the given solution is not working. I have studied in depth the skype update process and created this solution for all. Please check below (Edited Section) for more information. Recently while packaging Skype for enterprise version, I could not disable the Auto Updates and finally found a way to get rid of it. You can get the latest version of Skype setup in MSI format from the following URL: http://download.skype.com/msi/SkypeSetup.msi  or http://www.skype.com/go/getskype-msi There is no registry, file which can disable the Auto Update functionality of Skype. I searched in lots of forums and all said that it automatically prompts for update. So finally I decided to look in the MSI and find why and how it is doing it. What I found was that Skype has an Updater.exe in the installation folder and it also creates a Skype Update service which points to this exe. I just removed this service and updater.exe file...

App-V with Java/JRE/JDK

It is very critical to understand how to handle installation of Java related applications in App-V environment. While some are of the view that the application should be installed along with Java in the same bubble while some say that the Java version installed on the base machine can be used. Here is how you can do both of these in a proper way: 1) Java installed locally on the machine: If Java is locally installed on the machine and you capture the App-V application, then you will see a hard coded entry in the registry. This basically points the App-V application to look for Java in this local machine location. If you upgrade your Java version from say 1.6.21 to 1.6.24, then you do not need to worry, however, if you do a major upgrade from 1.6.21 to 1.7.xx then you need to upgrade your App-V Application as well. You need to maintain the software library for all these applications and then upgrade them as part of Java Upgrade in the organization. 2) Java is installed as local copy in...

Creating a Device driver based package in Installshield

Image
It is very easy and simle to create a device driver based application from Installshield. I am using Installshield 2012. You need to make sure that the driver is a signed driver. If the driver is not signed, then you need to sign the driver first. It is good to have your driver signed, but you can install and unsigned driver as well. Check an option later. Go to Installshield Wizard in Installation Designer and click on Project button on top an then Device Driver wizard. Click Next -> Select the path to your .inf file on your machine. Choose the system architecture. I am choosing x64 as I am packaging for 64 bit machines. Click Next-> Next-> Select the options as per your requirement. I have chosen the above ones. Click Next-> Click Next-> You will get the summary and then click on Finish. It will add the settings in your component of INF file. Hope this helps you create device driver easily with Installshield.

Packaging Google Chrome for Enterprise deployment

Many times it is an issue with the Administrators to deploy Google Chrome enterprise wide as there are lots of issues like: 1) Many people would have already installed various other versions of Chrome either through MSI or through exe. 2) How to customize Google chrome for enterprise wide deployment. *Edited: The new version has a few differences, please see the end of post on how to tackle this.* First, I would like to mention here that Google Chrome Enterprise version can be downloaded from the following location: http://www.google.com/intl/en/chrome/business/browser/ This site contains an MSI, which is already customized for business as in there are no desktop/Taskbar shortcuts and the application automatically goes to Program files folder. If you need to customize this, it is best to capture this MSI as it runs a Setup.exe from within. I would say that, this MSI is good enough to go like this too so not recommended to waste your time in capturing the MSI unless specifically require...

Definition of Application Re-Packaging

I have been often asked about the proper definition of Application Re-Packaging. This is the best I could find: Application Re-packaging solution offers customized application configuration and repackaging of third-party or internally-developed applications to standardize the installation routine, reduce deployment errors, and minimize support costs.

Frequently asked Questions about COM and Windows installer (MSI) / Application Packaging

What does the common language runtime do? The common language runtime manages the execution of code and provides services such as cross-language integration, code access security, object lifetime management, and debugging and profiling support. Search for "Common Language Runtime" in the MSDN Library ( msdn.microsoft.com/library/ ). What's the difference between managed and unmanaged code? Code developed with a language compiler that targets the common language runtime is called managed code. All code based on Microsoft intermediate language (MSIL) executes as managed code. Managed code is self-describing; it contains metadata that describes every element managed by the common language runtime. The runtime uses the metadata to provide services. Code that runs outside the runtime and does not contain metadata is called unmanaged code. Examples of unmanaged code are COM components, ActiveX interfaces, and Win32 API functions. Unmanaged code executes in the common language r...

Different Ways of Giving Permissions in Your Windows Installer

Image
Windows XP/Windows 7 works under a locked down environment in most organisations. The MSI authors generally have to provide permissions to the installation directory, so that the users without admin rights are able to access and write data into the installation directory. When you set permissions, you are specifying what level of access the user has to the folder and its files and what users can do within that folder such as save, delete, or read files. If you would like to know how to set permissions through Powershell Script, then I would recommend you to read my new blog entry here: http://msiworld.blogspot.com/2012/01/my-first-powershell-script.html There are six standard permission types which apply to files and folders in Windows XP/Windows 7: Full Control Modify Read & Execute List Folder Contents Read Write Each level represents a different set of actions users can perform. See the table below for more information. For folders you can also set your own unique permission...

Required Properties in MSI

There are five properties which are required by every Microsoft installer to identify itself from other MSI. These properties are required to be present in every MSI. These are the five properties: 1) Product Name: It is the name of the application you mention in your MSI. 2) Product version: This is the version of the product which you give.. like 1.0.0 etc.. 3) Product code: It is the unique GUID for your MSI. 4) Product language: This is the numeric value of product and should be one of those entries mentioned in Template summary property in Summary information stream. 5) Manufacturer: This is the name of the manufacturer of the product. For future upgrades, it is recommended to add Upgrade code property in the package.

Difference Between Self Heal and Repair

Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing, however there is difference in these two. Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application. When the application is launched by advertised shortcut, it checks for all the key paths of the Current Feature , if any of the key paths is missing it will launch Repair. Note that if there are multiple features then it will not check the missing key paths of the other features, but only the feature of which the advertised shortcut is launched. Repair of an MSI can be triggered by Repair button in Add/Remove programs Giving the command line msiexec /f{other option} {MSI name} Self Heal by advertised shortcut or other advertising information. Active setup Once the repair of the package is triggered, even with Self Heal, then the whole of the MSI is reinstalled. Then it does not see tha...

How REINSTALLMODE=amus Works

In any of these installation transactions, viz. initial installation, repair, reinstallation, on-demand installation or patching an MSI, The REINSTALLMODE has an affect on it. Here is what "amus" means: * a - Force all files to be reinstalled, regardless of version * m - Rewrite all registry keys that go to HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT * u - Rewrite all registry keys that go to HKEY_CURRENT_USER or HKEY_USERS * s - Reinstall shortcuts and icons The mentioning of "a" in amus forces the reinstallation of files on your machine irrespective of the file version rules. Every file updated by REINSTALL property will be updated in this case. The sequence of events which happen actually depend on the authoring of your patch. If your patch contains the full file, the installer will not access the source to reinstall that file, but if your file is the delta of the file, like an update to say ini file, then the patch will access first the machine file ...

Using SOURCEDIR Property in Package

SOURCEDIR property in MSI package refers to the location from where the MSI is installed in the machine. How do we use this property in our package. If you want to use a file which is kept in the source folder (next to where your MSI is placed), through Custom Action then you need to follow this procedure. The SOURCEDIR cannot be directly used in the package. If you read the logs then SOURCEDIR property is created and correctly pointed to the directory. But later the log shows that: Deleting SOURCEDIR... So the value of this property is deleted and the MSI does not get access to it. If you display message with [SOURCEDIR] property then it will be empty. The work around for this is that we can put an Action in the sequence called: "ResolveSource" after CostFinalize action. Then if you place your Custom Action after this action which refers to SOURCEDIR property then you will get the correct value of SOURCEDIR. Acknowledgement: I would like to thank my friend, Anurag, here who ...

Isolation of a File: Two Ways in One MSI

Generally you would have read that after isolation is done, we should not modify the MSI. So how to do .local and .manifest in the same MSI. Actually you would be thinking: "What is the need to do both types in the same MSI?" This is because, recently, I came across a situation in which we needed to do isolation of a file for installation of application in Windows 2000 through .local method and for installation in Windows XP and Vista through .manifest method. This was needed to be done through same MSI. This is the solution. Create a .msi file with .local isolation method for windows 2000. Then create another .msi file with .manifest isolation. Note the visual difference of .manifest isolation file and the base MSI. Make all the differences seen in this to the .msi which was created with .local isolation. Then compile it. This will not get corrupted. Only the ones with .manifest isolation if recompiled again get corrupted. So take care of this and you can then conditionalize...

How to Create Packages with a Size Greater Than 2 GB

Packages which need to include or which capture files with a total size exceeding 2 GB, it's necessary to use some tricks. Usually the MSI with cabs compressed outside the MSI allows the maximum size of cab files to be 2 GB. If the cab size file tries to exceed 2 GB, then the WISE package compilation throws an error. For this you need to create separate features. In these separate features, distribute the files in the package so that the feature has a total file size of less than 2 GB. After this you need to go to Media option in Installation expert and choose option one cab file per feature. This will give you the MSI along with cab files which have size less than 2 GB. Since the total package size will be very big, the downloading of cab files while deploying and then uncompressing them, will take lots of time. So the other solution is to choose the option of Uncompressed Files outside MSI in the media option. This will save time during installation.

Using VBScript to Set Properties in MSI

We can easily use Set Property Custom Action to set Windows Installer Property, but sometimes we wish to set the property directly in VbScript, specially if we are taking an input from a user through VBScript. Hope this tip helps. To set property through VBScript we can use "Session" object like: Session.Property("ALLUSERS")="1" or we can directly use Property keyword like: Property("REBOOT")="ReallySuppress" The only catch here is that we cannot set INSTALLDIR property through the above method as the package uses Directory table to store the value of INSTALLDIR. We need to write the below VBScript to set INSTALLDIR: dim instpath instpath = "C:\newpath\newfolder" Session.TargetPath("INSTALLDIR")=instpath Remember to place this Custom Action after CostFinalize if you are changing the value of INSTALLDIR property in UI Sequence.

Exclusion List

Exclusion List • Manual Checks: Exclude (delete) any unwanted files and folders. Some common file extensions that should usually be excluded are listed below. If the resource you are deleting is a keypath (indicated by the key symbol) you must ensure the related component has been assigned a new keypath. If the component is now empty it can be deleted. Common Items: HKEY_USER_SELECTABLE\Software\Shortcuts Event log registries. All VCache Entries Shutdown Entries Uninstall Entries Your Username if Captured *.log-app specific services / hosts – These must be handled appropriately Folders/ Files referring to Wise Folders/ Files referring to InstallShield Any cookies Any file from the dependency applications that has got captured must be excluded. Cache Temp Tmp Bag Log – Examine in notepad to see if they are relevant or not. • Files *.REG files _isreg32.dll setup.exe install.log install.exe install.ini unwise.exe Uninstall.xml Upgrade.exe Update.exe uninstall.cif uninstall.cfg / uninstall...

Troubleshooting Unnecessary Repairs

Sometimes you may encounter the problem of unnecessary repairs of MSI while launching the shortcut in the same logged in user. Here is the way to troubleshoot this problem. You can go to eventviewr (by typing eventvwr in Run command) then to applications and check the latest error message after repair. It will tell you which component is missing and because of which MSI went for self heal. You can now check out this component in your package and see what the problem is. Maybe your keypath is a moving target for that component. There are other methods too which can be used in case the above does not work. These are Logs/Gap capture. More on this later.

Why Custom Action Type 51 is Required

If you have always wondered why we need to anSet Property Custom action when there is already a Property table to handle it, then this is for you. Suppose we have to create a property based on the value of another property - in that case we cannot use the Property table to handle this. There will be a circular reference in which one property would be based on the other. In this scenario we use Set Property Custom Action. To affect a property used in a condition on a component or feature, the custom action must come before the CostFinalize action in the action sequence.

Order of Precedence for Properties

The installer sets properties using the following order of precedence. A property value in this list can override a value that comes after it and be overridden by a value coming before it in the list. 1) Properties specified by the operating environment. 2)Public properties set on the command line. 3)Public properties listed by the AdminProperties property set during an administrative installation. 4)Public or private properties set during the application of a transform. 5)Public or private property that set by authoring the Property table of the .MSI file.

ICE Errors

Hi All, My this post details about what ICE errors, how to check them and how to correct them. Many of you might be facing this problem. What are ICE Errors ICEs - Internal Consistency Evaluators Internal consistency evaluators, also called ICEs, are custom actions written in VBScript, JScript, or as a DLL or EXE. When these custom actions are executed, they scan the database for entries in database records that are valid when examined individually but that may cause incorrect behavior in the context of the whole database. For example, the Component table may list several components that are all valid when tested individually with MsiViewModify. However, MsiViewModify would not catch the error when two components use the same GUID as their component code. The custom action ICE08 is designed to validate that the Component table does not contain duplicate component code GUIDs. ICE custom actions return four kinds of messages: Errors: Error messages report database authoring that cause i...

Frequently Asked Questions about Windows Installer (MSI) Packaging.

These are the most Frequestly asked queries, which I have compiled from lots of places and have put together. I have added more questions in other post which can be accessed by below link. http://msiworld.blogspot.com/2011/11/frequently-asked-questions-about-com.html Q. What is Windows Installer? A. Windows Installer is a system service for installing and managing applications. It provides a standard method for developing, customizing, installing, and updating applications. Q. What basic functionality is provided by Windows Installer? A. Windows Installer provides the following basic functions: Transactional operations. All installation operations are transactional. For each operation that Windows Installer performs, it generates an equivalent undo operation that would undo the change made to the system. If a failure occurs during the middle of an installation, Windows Installer can roll back the machine to its original state. Self-healing. Windows Installer supports "self-he...