Data Loading...
Quick Start Guide Flipbook PDF
MSI Studio Step 2. Find out the Method of Installation This step involves deciding which of the repackaging methods outl
115 Views
106 Downloads
FLIP PDF 587.66KB
MSI Studio Quick Start Guide
MSI Studio
© 2008 by ScriptLogic Corporation All rights reserved. This publication is protected by copyright and all rights are reserved by ScriptLogic Corporation. It may not, in whole or part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machinereadable form without prior consent, in writing, from ScriptLogic Corporation. This publication supports MSI Studio. It is possible that it may contain technical or typographical errors. ScriptLogic Corporation provides this publication “as is,” without warranty of any kind, either expressed or implied.
ScriptLogic Corporation 6000 Broken Sound Parkway NW Boca Raton, Florida 33487-2742 1.561.886.2400 www.scriptlogic.com
Trademark Acknowledgements ScriptLogic and the ScriptLogic logo are either registered trademarks or trademarks of ScriptLogic Corporation in the United States and/or other countries. The names of other companies and products mentioned herein may be the trademarks of their respective owners.
Page 2
MSI Studio
DOCUMENTATION CONVENTIONS Typeface Conventions Bold
Indicates a button, menu selection, tab, dialog box title, text to type, selections from drop-down lists, or prompts on a dialog box.
CONTACTING SCRIPTLOGIC ScriptLogic may be contacted about any questions, problems or concerns you might have at: ScriptLogic Corporation 6000 Broken Sound Parkway NW Boca Raton, Florida 33487-2742 561.886.2400 Sales and General Inquiries 561.886.2450 Technical Support 561.886.2499 Fax www.scriptlogic.com
SCRIPTLOGIC ON THE WEB ScriptLogic can be found on the web at www.scriptlogic.com. Our web site offers customers a variety of information:
Download product updates, patches and/or evaluation products.
Search Frequently Asked Questions, for the answers to the most common non-technical issues.
Participate in Discussion Forums to discuss problems or ideas with other users and ScriptLogic representatives.
Locate product information and technical details. Find out about Product Pricing. Search the Knowledge Base for Technical Notes containing an extensive collection of technical articles, troubleshooting tips and white papers.
Page 3
MSI Studio
Contents WHY USE PACKAGING SOFTWARE? .............................................................. 5 WHAT IS WINDOWS INSTALLER?................................................................. 5 TYPES OF VENDOR SUPPLIED SOFTWARE INSTALLATIONS.......................... 5 LEGACY SOFTWARE INSTALLER ............................................................................ 5 EXISTING WINDOWS INSTALLER SOFTWARE PACKAGE .................................................. 6 INSTALLATIONS THAT CANNOT BE REPACKAGED IN MSI FORMAT ...................................... 6 THE PACKAGING PROCESS USING MSI STUDIO............................................ 6 MODIFYING AN EXISTING MSI FILE............................................................. 8 EXISTING MSI FILE EXAMPLE .............................................................................. 9 REPACKAGING A (LEGACY INSTALLATION) APPLICATION ......................... 14 REPACKAGING EXAMPLE ...................................................................................16 CREATING A WRAPPER INSTALLATION ...................................................... 23 WRAPPER INSTALLATION EXAMPLE .......................................................................24
Page 4
MSI Studio
Getting Started Packaging Software is the process of creating standardized software installation packages for the applications that are to be installed on computers on your network. Packaging using Windows Installer allows for easy deployment using Group Policy, Active Directory and commercial deployment tools.
WHY USE PACKAGING SOFTWARE? Traditional software installers come in many formats, many are script based, some are executable code, and others just come with a set of manual instructions of where to copy files and how to register them. The problem with having a variety of installation methods is that there is often no way of knowing what changes are being made to a system, and no way of monitoring potential conflicts between applications, or repairing an application if it is placed into an unstable state. It is common with legacy installations for one application to place another in an unstable state by modifying a component.
WHAT IS WINDOWS INSTALLER? Windows Installer is a service which runs on Windows and installs, repairs, or removes software according to instructions contained in .MSI files. A local cache is always maintained of this .MSI file and Windows Installer makes checks of applications to maintain them in a working state. Checks are made when running shortcuts and file extensions or other ‘entry points’ into an application.
TYPES OF VENDOR SUPPLIED SOFTWARE INSTALLATIONS Software applications can generally be grouped into one of three categories for packaging purposes. These are described below:
Legacy Software Installer This is a software installation which is in non-MSI format (could be script, .exe, or manual). These types of software installations will be “repackaged”. Essentially what will happen is the changes that they make to a system will be captured and a new Windows Installer-based installation package will be created for the application.
Page 5
MSI Studio
Existing Windows Installer Software Package As software vendors come to understand the benefits of using Windows Installer-based installations, more of them are distributing their software as .msi files (or a .msi file wrapped in a .exe). It is generally accepted that vendor-supplied Windows Installer packages should not be modified. There are two main reasons why you should not repackage vendor supplied .msi files. It’s a waste of time repackaging something back into its original format (although the shoddy state of some of them might make you think otherwise!) If you repackage the original msi file then any updates or patches supplied by the vendor will also need to be repackaged. This can lead to problems further down the track. However, it is possible to modify a .MSI file using a ‘transform’ which is a type of Windows Installer –qn
REPACKAGING A (LEGACY INSTALLATION) APPLICATION The second process is to repackage an application into an .MSI as its current installation is in non-Windows Installer format. 1. Start MSI Studio and on the first screen select ‘Repackage an Application for Deployment around a Corporate Network’ 2. Select ‘Repackage a legacy installation’ on the second wizard screen. 3. Fill in the fields accordingly:
In the top field enter the name of the file to save the .msi to.
In the next field select whether to do an initial scan of the Repackage machine. You should always select to do a scan unless you have previously done one and NOT made any changes to the repackaging machine since that time.
The next field gives 3 options. Generally it is recommended not to check any of these options as it is possible to do all these things later once the repackaging process has been completed. Making these changes at a later time gives you the option of first making a copy of the unchanged .msi. The three options are:
Enter the name of the machine on which you want to perform the capture of the changes as well as the username and password to use. This should be the name of the Repackaging machine (if you have entered this before it should be in the drop down list). The username and password should be the same as you are currently logged on to the development machine and should have administrator privileges.
a. To search for, and, add merge modules containing files which have been captured in the repackaging process instead of the files themselves. b. To display a dialog listing the files and registry entries which are about to be added to the project, allowing you to remove those that are not required. c. To create advertising table entries from the registry table entries. This involves creating Appid, Class, Typelib, Extension, and ProgId table entries.
Page 14
MSI Studio
The next option is whether to copy files to the source repository. It is recommended you select this option and specify a sub-directory below where you are saving the .msi file to. Selected files which are captured during the repackaging process will be copied from the repackaging machine to the directory specified allowing you to rebuild this machine and maintain a copy of the files required to rebuild the .msi. If you do not have a copy of these files then you can run into problems making changes at a later date.
The next option is to select whether to use file system monitoring against doing a before-and-after scan of the files on the repackaging machine. It is recommended you select this option as it is much quicker. If you have experienced any problems then you might wish to do a full scan.
Next click the ‘Edit Drives to Watch’ to display the directories to watch during the repackaging process. Generally include just the drives where Windows, your program files folder and profiles are stored.
Finally you can edit the exclusions list. This is a list of registry keys, directories and files which should be excluded from any project.
4. Select ‘Next’ and wait while an initial scan is made of the Repackaging machine. 5. Once this is complete go to the Repackaging machine and run the legacy software installation program. Also make any configuration changes necessary and start up the application. 6. Once all necessary changes have been made go back to the Development machine and click “Next” to start the post scan of the Repackaging machine. 7. Once the scan has been finished, files and registry entries will be added to the project and the project opened. 8. The first thing you need to do is select the IQViews and go to the Product Details panel. Enter details relating to the project name, manufacturer, version number and other relevant information. 9. Next go to the File view and click through all the folders in the lower project view. Delete any files which you know are not required in the project, these might include any installation and uninstallation files and log files. Knowing what to remove comes with experience - so keep practicing! 10. In a similar manner go to the registry view and remove any registry entries which are not required.
Page 15
MSI Studio 11. Convert Registry Information to Advertised Information.
This step is not always necessary and should only be done if it’s part of your packaging team’s policy. Advertised entries are necessary if you are implementing Install-On-Demand. Create advertised entries by selecting from the menu Tools>Extract/Convert Registry COM. Select only the middle option ‘Convert Registry Tables Entries to COM Tables’ in the resulting dialog box and press OK.
12. Validation of the Package.
The amount of validation that you do of repackaged applications depends on your QA process. It is recommended that you remove all validation errors except for those that you are sure will not cause problems. MSI Studio comes with 2 forms of validation, the first is MCE which is a super fast validation developed by ScriptLogic, and ICE validation which is the validation provided by the SDK. We recommend that you first use the MCE validation and once you have got rid of all those errors you think necessary, you then use the ICE validation as a final check. MCE is based upon ICE and you will see similar results.
13. After validation, fix the problems that occur, and repeat the process until you are satisfied with the state of the project. 14. Test the project.
On your test machine test both the running of the installation that no errors occur - and that the application works after installation. If you are having problems with the installation it is a good idea to use logging (see SDK help).
Repackaging Example For an example of an application that needs to be repackaged we will use WinZip 9.0. 1. Select the Process. Winzip 9.0 is downloaded as a file called winzip90.exe. This does not offer too many clues as to whether it is a Windows Installer file or not. Running it produces the following dialog box :
Page 16
MSI Studio If we check the Task Manager there has been no extra Windows Installer processes started (msiexec.exe) therefore we can conclude that this is a non Windows Installer installation. 2. Run MSI Studio and Select ‘Repackage An Application For Deployment around a Corporate Network’
3. Select ‘Repackage a legacy installation’
Page 17
MSI Studio 4. Here we specify the name of the file to save the project to and make the selections as outlined in the previous section. The name of the machine we are doing the repackaging on is ‘Repackager’ and this has been recently rebuilt with a fresh image.
5. Make sure that the correct drives have been specified in the Drives to Watch. In this case we only need drive c:\
Page 18
MSI Studio 6. Press ‘Start’ and the repackaging process will begin.
7. Once the initial scan has been done, go to the Repackaging machine and install WinZip selecting the options we want when we deploy it around our networks.
Page 19
MSI Studio 8. After installing our application we press the ‘Next’ button back on our development machine and wait while the after scan is done and then items added to the project.
9. First thing we do once the package has loaded is enter some details about the product in the Product Details.
Page 20
MSI Studio 10. Next we go to the file view and search through the project folders for files that should not be included. In this case none are found.
11. Now do the same thing with the registry view. Here we delete several keys under Windows\CurrentVersion\Explorer
Page 21
MSI Studio 12. Check the shortcuts. Here we will delete the shortcut on the desktop as it is against our policy to have icons on the desktop. Also we delete the shortcuts to the text files WhatsNew.txt and ReadMe.txt
13. Next we save and then do a MCE Validation.
14. We find 3 errors, the first can be fixed by moving the registry entry in HKEY_CURRENT_USER from the component WZSEPE32.EXE to CurrentUser. The next 2 we fix by adding entries in the RemoveFile table. Also we can delete the icons specified in the warning #36. Note: How to go about fixing errors and warnings is beyond the scope of this document. What is important at this stage is the process of fixing them.
Page 22
MSI Studio 15. Next we do a full ice validation to check there are no more errors which there are not.
NOTE that the ICE33 relate to advertised COM entries in the registry table which we can ignore in this case as we are not advertising products. However we could get rid of many of these by running Tools>Extract/Convert Registry COM 16. Now we are done so we go to our test machine and test.
CREATING A WRAPPER INSTALLATION This process is used to wrap installations which cannot be repackaged. Reasons installations should not be repackaged are if they are installing settings which differ on different machines, or if they are updating windows protected system files. Examples might include windows updates and security patches. Changes should not be captured but rather the original installation or patch should be wrapped in a Windows Installer .msi file for deployment.
Page 23
MSI Studio 1. First make sure that the installation can and should be installed by testing the vendor installation. Also during this step find out whether it can be uninstalled. Often installations of this type cannot easily be uninstalled. 2. Find out the correct command line parameters with which you wish to install and uninstall the vendor installation. Remember that you need to be able to do this silently. 3. Open MSI Studio and from the start page select ‘Repackage An Application For Deployment Around a Corporate Network’ 4. Select ‘Wrap an Executable in an MSI’ 5. On the ‘Create a Wrapper Install for An Executable’ screen
In the top field enter the name of the file to save the msi database to.
In the next field select the vendor’s installation program which should be an executable file.
Enter the command line parameters to run on installation i.e. /quiet
If you wish to create an uninstall select the radio button ‘Run the executable on uninstall” and enter any command line parameters i.e. /quiet /uninstall
6. Press ‘GO’ and the msi will be created and opened. Now you can add any other things you might need in the project such as files and registry entries. NOTE: There will already be one registry entry in the project, this is just a dummy key which is required by Windows Installer as it must install ‘something’ and it must contain at least one component.
Wrapper Installation Example In this example we will repackage the Microsoft Update KB884020. When we download this from the Microsoft site it comes as an executable. Knowing that it is a Windows Update we decide not to repackage it, but rather to wrap it in a .msi to make for easy deployment. 1. Test the installation on the test machine using the command lines /quiet /norestart on install and /quiet /norestart /uninstall on uninstall. We got these command lines from the Microsoft website. As these seem to work well we can start the wrapping process.
Page 24
MSI Studio 2. Run MSI Studio and Select ‘Repackage An Application For Deployment around a Corporate Network’
3. Then select ‘Wrap an Executable in an MSI’
Page 25
MSI Studio 4. Fill in the required fields with the information gathered above.
5. Hit the ‘GO’ button and the project is created and opened. Enter the project details on the Project Details form. That is all the changes we need so we can save and then test.
If you have any questions or suggestions about using MSI Studio, please visit the ScriptLogic website.
Page 26