Data Loading...

Administrators Guide To Packaging Software Using Windows ... Flipbook PDF

MSI Studio Page 3 DOCUMENTATION CONVENTIONS Typeface Conventions Bold Indicates a button, menu selection, tab, dialog bo


111 Views
64 Downloads
FLIP PDF 1.45MB

DOWNLOAD FLIP

REPORT DMCA

MSI Studio Quick Start Guide

MSI Studio

Copyright © 1998-2011 ScriptLogic Corporation and its licensors. All rights reserved. This program is protected by U.S. and International copyright laws as described in Help-About. Protected by U.S. Patents 6,871,221; 7,293,087; 7,353,262; 7,469,278; 7,814,460 and 7,912,929 with other U.S. and International Patents Pending. 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 machine-readable form without prior consent, in writing, from ScriptLogic Corporation. This publication supports MSI Studio 4.2. 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: MSI Studio, 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.



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.



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.

Page 3

MSI Studio Table of Contents REGISTRATION AND EVALUATION .................................................................................................... 5 PRODUCT REGISTRATION WIZARD .............................................................................................................. 6 GETTING STARTED................................................................................................................................. 13 WHY USE PACKAGING SOFTWARE? ...........................................................................................................13 WHAT IS WINDOWS INSTALLER? ................................................................................................................13 TYPES OF VENDOR SUPPLIED SOFTWARE INSTALLATIONS .........................................................................14 Legacy Software Installer ......................................................................................................................14 Existing Windows Installer Software Package ......................................................................................14 Installations that cannot be repackaged in MSI Format .......................................................................14 THE PACKAGING PROCESS USING MSI STUDIO .........................................................................................15 MODIFYING AN EXISTING MSI FILE ...........................................................................................................16 Existing MSI File Example ....................................................................................................................17 REPACKAGING A (LEGACY INSTALLATION) APPLICATION .........................................................................23 Repackaging Example ...........................................................................................................................26 CREATING A WRAPPER INSTALLATION ......................................................................................................34 Wrapper Installation Example...............................................................................................................35

Page 4

MSI Studio

Registration and Evaluation MSI Studio is available in two editions: MSI Studio Professional Edition and MSI Studio Professional Edition Evaluation. Once installed (or upgraded) the MSI Studio software is available as the Evaluation version. The Evaluation version is free of charge and provides access to the full scope of MSI Studio features with the following restrictions: 

The program will stop functioning 30 days after it has been launched for the first time (a license key must be applied to continue working with MSI Studio);



3 projects can be imported into the Software Warehouse;



"Test Package" will be appended to the file and product names of the saved MSI packages.

A license is required to switch from MSI Studio Professional Evaluation to MSI Studio Professional. Use the Product Registration Wizard to apply the license. Use the Buy item on the MSI Studio menu bar to purchase MSI Studio Professional and get a corresponding license key.

Page 5

MSI Studio

PRODUCT REGISTRATION WIZARD To switch from evaluation mode to the licensed product, use the Product Registration Wizard to enter the license key. To open the Product Registration Wizard: 1.

Go Start -> All Programs -> ScriptLogic Corporation -> MSI Studio > MSI Studio.

2.

From the menu bar of the MSI Studio Console that will open, click Help -> Upgrade to Profesional Version. The Registration Wizard will launch.

The first page of the Registration Wizard prompts for the provided MSI Studio license key. Please enter it in the space provided. If you have an older license file that does not match the current license file format, click Upgrade License. You will be provided with a new license file that matches the upgraded license format. Upgrades: If a license already has been registered for MSI Studio 4.0 and above, the license will automatically be recognized and upgraded for the new installation. Licenses for installations prior to 4.0 must be upgraded by clicking the Upgrade License button.

Page 6

MSI Studio

Select your licensing type from FULL or LIMITED Licensing Management.

The Registration Wizard will connect with ScriptLogic's online registration services to validate the license key. This is an online process but can be done from any computer that has internet access. The computer that MSI Studio is installed to does not need an internet connection. Page 7

MSI Studio

Select Online registration mode if the computer has an internet connection. If there is no internet connection available on the computer, select Offline registration. Click EULA to read the End User License Agreement. Click Next to continue the Registration process, click Cancel to exit the Registration Wizard. Online The next page of the Registration Wizard will ask for confirmation of the registration information before it connects to the ScriptLogic registration services. Click Next to start the online registration process. Click Back to go to prior page of Registration Wizard. Click Cancel to exit the Registration Wizard. Click Proxy Settings to use a Proxy Server for your connection.

Page 8

MSI Studio

The registration results will be posted when complete. Click Finish to complete the registration process. Offline The offline process of the Registration Wizard generates a special file to be uploaded to the ScriptLogic registration service from any computer that has internet access. Once the licensing is validated online, a validated product license file is then downloaded and imported to the computer where MSI Studio is installed. Select the Export registration file action from the Action box. Specify a location where the registration file will be exported to. Click Next to start the online registration process. Click Back to go to prior page of Registration Wizard. Click Cancel to exit the Registration Wizard.

Page 9

MSI Studio

The next dialog will provide the export file status and the complete path and file location of the exported file.

Page 10

MSI Studio Copy this file to a computer that has an internet connection. On that computer, open a web browser and load the following URL: http://www.scriptlogic.com/phlcp/OfflineRegistrationPage.aspx. Follow the instructions on that page to upload the product registration file.

Once complete, click the Download File link to get your MSI Studio license file. Now, copy that file to the computer with MSI Studio installed on it and click Next in the Registration Wizard. If the Registration Wizard is not already active, select Help>Update License File to load it and select the Import Registration File action.

Page 11

MSI Studio Specify the path to the registration file to be imported and click Next. Once the file is imported, click Finish to complete the registration process.

Page 12

MSI Studio

Getting Started Packaging Software is the process of creating standardized software installation packages for the applications that are to be installed to the computers in 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 the .MSI files. A local cache is always maintained of this .MSI file and Windows Installer makes checks of applications to keep them in a working state. Checks are made when running shortcuts and file extensions or other „entry points‟ into an application.

Page 13

MSI Studio

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 a 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.

Existing Windows Installer Software Package As software vendors come to understand the benefits of using Windows Installerbased installations, more of them are distributing their software as .msi files (or an .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 road. However, it is possible to modify an .MSI file using a „transform‟ which is a type of Windows Installer –qn

Page 22

MSI Studio

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.



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.



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: 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 23

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 versus 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 24

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).

Page 25

MSI Studio

Repackaging Example For this 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:

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‟

Page 26

MSI Studio 3. Select „Repackage a legacy installation‟

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.

Page 27

MSI Studio 5. Make sure that the correct drives have been specified in the Drives to Watch. In this case we only need drive c:\

6. Press „Start‟ and the repackaging process will begin.

Page 28

MSI Studio 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.

8. After installing our application we press the „Next‟ button on our development machine and wait while the after scan is done and the items are added to the project.

Page 29

MSI Studio 9. First thing we do once the package has loaded is enter some details about the product in the Product Details.

10. Next we go to the file view and search through the project folders for files that should not be included. In this case no extra files are found.

Page 30

MSI Studio 11. Now do the same thing with the registry view. Here we will delete several keys under Windows\CurrentVersion\Explorer

Page 31

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 32

MSI Studio 15. Next we do a full ICE validation to check there are no more errors; which there are none.

Note: The ICE33 error relates 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.

Page 33

MSI Studio

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. 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 necessary; i.e. /quiet /uninstall

6. Press ‘GO’ and the msi file 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.

Page 34

MSI Studio

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 an .msi to make for easy deployment. 1. Test the installation on the test machine using the command lines /quiet /norestart on the install and /quiet /norestart /uninstall on the uninstall. We got these command lines from the Microsoft website. As these seem to work well we can start the wrapping process. 2. Run MSI Studio and Select „Repackage An Application For Deployment around a Corporate Network’

Page 35

MSI Studio 3. Then select „Wrap an Executable in an MSI‟

4. Fill in the required fields with the information gathered above.

Page 36

MSI Studio 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 37