C
C
r
r
e
e
a
a
t
t
i
i
n
n
g
g
a
a
R
R
e
e
a
a
d
d
y
y
C
C
o
o
n
n
n
n
e
e
c
c
t
t
C
C
l
l
i
i
e
e
n
n
t
t
U
U
s
s
i
i
n
n
g
g
t
t
h
h
e
e
I
I
C
C
A
A
3
3
2
2
M
M
S
S
I
I
P
P
a
a
c
c
k
k
a
a
g
g
e
e
Notice
The information in this publication is subject to change without notice.
THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. CITRIX SYSTEMS, INC. (“CITRIX”), SHALL NOT BE LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED HEREIN, NOR FOR DIRECT, INCIDENTAL, CONSEQUENTIAL, OR ANY OTHER DAMAGES RESULTING FROM THE FURNISHING, PERFORMANCE, OR USE OF THIS PUBLICATION, EVEN IF CITRIX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES IN ADVANCE.
This publication contains information protected by copyright. Except for internal distribution, no part of this publication may be photocopied or reproduced in any form without prior written consent from Citrix.
The exclusive warranty for Citrix products, if any, is stated in the product documentation accompanying such products. Citrix does not warrant products other than its own.
Product names mentioned herein may be trademarks and/or registered trademarks of their respective companies. Copyright © 2002 Citrix Systems, Inc., 851 West Cypress Creek Road, Ft. Lauderdale, Florida 33309 U.S.A. All rights reserved.
Version History
September, 2002 Version 1.0
Table of Contents
Overview... 1
Requirements ... 1
Installing the Prerequisite Utilities... 1
The Orca Editor... 1
The CABARC Utility... 4
Creating a Custom Version of the ICA Win32 Program Neighborhood Client... 4
Before You Begin ... 4
Extracting The CAB File From ICA32.Msi... 5
Extracting the Client Files From the Cab File... 6
Creating a File List of the Cab File Contents... 6
Extracting the Client Files ... 7
Modifying the Client Files for Your Needs... 8
Repackaging The Files ... 8
Overview
This document details the steps for creating a customized MSI package for the ICA Client. To do so, this document walks you through the process of extracting a .cab file from the default MSI package, unpacking and modifying the contents of that .cab file, then create a new .cab file and inserting it in the MSI package. This document assists you in creating:
• A version of the Citrix ICA Win32 Program Neighborhood Client that contains your custom set of parameters.
• A Windows Installer file for the custom version of the client so you can deploy it network-wide.
This document refers to non-Citrix utilities and tools. Direct any questions or issues regarding these tools to the appropriate manufacturer.
Requirements
• A Windows Workstation or Server (Windows 2000 Workstation or Server, Windows XP Pro)
• Microsoft Windows Installer 2.0 or later
• Microsoft’s Orca Editor
• Microsoft’s CABARC utility
• The Citrix ICA32.msi file
• The following Citrix Knowledgebase articles
• CTX145271 — PN.ini Parameters Deciphered
• CTX331178 — Appsrv.ini Parameters Deciphered
• CTX466058 — How to Create a Preconfigured Program Neighborhood Client
• The ICA Win32 Client Configuration Guide, which is in the Citrix Support Knowledgebase at
http://knowledgebase.citrix.com/SERVICESOFT/DATA/CITRIXKB/document/clientdoc/ini_file_reference.pdf.
Installing the Prerequisite Utilities
The Orca Editor
The Orca Editor is Microsoft’s MSI file editor; it is on the MSDN Web site. Other editors are available on the Internet but we will use Orca. The Orca Editor allows you to edit the .msi file directly and create new or change existing .mst files. Follow these steps to download and install the editor. For our purposes, we will install the Orca Editor on a Windows workstation.
1. Go to the MSDN Platform SDK download Web site at
http://www.microsoft.com/msdownload/platformsdk/sdkupdate.
3. In the left window pane, select Windows Installer SDK.
4. In the right window pane, select Install this SDK! When you select the link, you are directed to the Confirm Install
SelectionsWeb page where your system is checked for any existing components.
6. Click the Continuebutton on the right side of the screen to start the download. The download includes the following components:
• Windows Installer SDK documentation
• Windows Installer development files (.h, .lib)
• Sample .msi files
• Sample scripts for working with Microsoft Installer
• Orca database editing tool
• MSIVal2 database validation tool
Before the download starts, you are notified that the installer process has privileged access to your system and that you should download only the SDK from the Microsoft site. If you are downloading from the Microsoft page, click
OK. (See bitmap below.)
7. Accept the license agreement.
8. Select the directory where you want to install the program (the default is c:\Program Files\Microsoft SDK). 9. Click Install Now. The SDK components download to your system.
10. When installation is complete, close your Web browser.
11. Change to the directory where you installed the program and then switch into the Bin subdirectory (for example, C:\Program Files\Microsoft SDK\Bin).
12. Double click the Orca.msi file to install it.
Installation adds an Orca entry to your Start >Programs menu.
The CABARC Utility
The CABARC command-line utility is included in the Windows Platform SDK that you downloaded for the Orca Editor. It is also in the \Bin directory where the ORCA Editor is; for example, C:\Program Files\Microsoft SDK\Bin. It is not necessary to run any type of install.
Creating a Custom Version of the ICA Win32
Program Neighborhood Client
Before You Begin
Create a temporary directory on your local hard drive. In this directory, create three subdirectories and name them
Original, Extracted, and Reconfigured.
In the examples and steps below, the following directories are referenced:
• C:\NewICA32File\
• C:\NewICA32File\Original\
• C:\NewICA32File\Extracted\
Extracting The CAB File From ICA32.Msi
1. Copy the ICA32.msi package into the Original directory. This is the clean unmodified version. 2. Open the ICA32.msi file with the Orca editor.
3. In the left window of the Orca editor, click the Cabs table entry.
In the right window pane, there is an entry labeled w1.cab. This .cab file contains all of the Win32 Client files. The files need to be extracted so they can be modified with your custom settings.
4. Double click the [Binary Data] field in the Orca Editor. The following dialog box appears:
5. Check Write binary to filename and specify a location and filename to which to extract the w1.cab file; for example, specify c:\NewICA32File\original\w1.cab.
6. Click OK.
Extracting the Client Files From the Cab File
Before you extract the files from the .cab file, you must first create a list of the files that are inside the .cab file. This is important for the repackaging phase. The installation program requires the files to be in a specific order in the .cab file. You need to create this list file to maintain this structure during the repackaging phase. If this list is not used, the installation of your modified client package will fail.
Creating a File List of the Cab File Contents
Go to the directory to which you extracted the .cab file. If you have WinZip installed on your system, the .cab file will have the WinZip icon associated with it. While WinZip allows you to extract the files, you cannot use it to repackage the .cab file with your modified files. To do this, you will use Microsoft’s CABARC command line utility.
1. From a command prompt, change to the directory where you installed the Windows Platform SDK. By default, it is C:\Program Files\Microsoft SDK\Bin. Run the CABARC utility without any switches to get a list of available options.
Usage: CABARC [options] command cabfile [@list] [files] [dest_dir] Commands:
L List contents of cabinet (cabarc L test.cab)
N Create new cabinet (cabarc n test.cab *.c app.mak *.h) X Extract file(s) from cabinet (cabarc x test.cab foo*.c)
Options:
-c Confirm files to be operated on
-o When extracting, overwrite without asking for confirmation
-m Set compression type [LZX:<15..21>|MSZIP|NONE], (default is MSZIP) -p Preserve path names (absolute paths not allowed)
-P Strip specified prefix from files when added
-r Recurse into subdirectories when adding files (see -p also) -s Reserve space in cabinet for signing (-s 6144 reserves 6K bytes) -i Set cabinet set ID when creating cabinets (default is 0)
-d Set diskette size (default is no limit/single cab)
2. To create the list file, run the CABARC utility with the L command and reroute the output to a text file; for example: C:\NewICA32File\Original>cabarc L w1.cab >list.txt
3. When the command is finished running, you are returned to a command prompt. To verify the contents of the text file, open it in Notepad.
Here is a partial listing of what appears in the file: Microsoft (R) Cabinet Tool - Version 5.00.2134.1 Copyright (C) Microsoft Corp. 1981-1999.
Listing of cabinet file 'w1.cab' (size 1786272): 78 file(s), 1 folder(s), set ID 2200, cabinet #0
File name File size Date Time Attrs
--- --- --- --- --- CONCENTR.hlp 11445 3/26/2002 14:41:28 -a--
concentr.cnt 510 3/26/2002 14:41:28 -a--
Mfc30.dll 322832 10/23/2001 12:50:30 -a--
PROGN.hlp 152101 4/4/2002 11:01:16 -a--
progn.cnt 1881 4/2/2002 18:13:54 -a--
PScript.dll 24848 4/18/2002 20:57:16 -a-- ProxySup.ocx 57616 4/18/2002 20:43:00 -a--
To make the list usable for the repackaging portion of the process, you need to remove all of the data from the files except for the file names. After you delete the data, save the file in the C:\NewICA32File\Extracted directory. When completed, your file will look like this:
CONCENTR.hlp concentr.cnt Mfc30.dll PROGN.hlp progn.cnt PScript.dll ProxySup.ocx
The only information in the text file is the list of 78 files.
Extracting the Client Files
Modifying the Client Files for Your Needs
Now that the files are extracted, modify the appropriate files for your particular needs (PN.ini, Appsrv.ini, and so on). See Citrix Knowledgebase articles CTX145271, CTX331178, and CTX466058 for more details about making changes to the client files. Additionally, see the ICA Win32 Client Configuration Guide. It is available on the Citrix Web site.
Repackaging The Files
When the files are customized, you can start the repackaging process.
1. From the C:\NewICA32File\Extracted directory, type the following command: cabarc -i 2200 N c:\newica32file\reconfigured\w1.cab @list.txt
The – i command sets the cab file’s ID number (use 2200). The N instructs CABARC to create a new .cab file.
The @list.txt instructs CABARC the order in which to place the files in the .cab file.
2. Next, copy the ICA32.msi file from the c:\NewICA32Files\original directory into the reconfigured directory. 3. Open the ICA32.msi file in the Orca Editor.
5. In the right window pane, double-click the [Binary Data] field. The Edit Binary Stream dialog box appears.
6. Click OK. The Orca dialog box appears.
7. Click OK.
8. Save the MSI package in the Orca Editor (File, Save or Ctrl+S, or click the floppy icon). 9. Close the Orca Editor.
Your customized ICA32 Client is ready for testing on a client system. Citrix recommends that you fully test this newly packaged client before distributing it in your production environment.
Error Messages
When installing the newly configured client, the following dialog box may appear when the file copy process starts.