The Microsoft App-V Team Blog

The official blog for Microsoft Application Virtualization

Inside the Sequencer - Part 2

Inside the Sequencer - Part 2

  • Comments 3
  • Likes

Sequencing

Sequencing is a 34 step process or thereabouts. I usually say that it is a 3 phase process, and although that is true, there are three major phases of the Sequencer, each phase has multiple steps. We will go through each phase and every step along the way

Phase I – The Package Configuration Phase of the Sequencer

Package Information

This phase is responsible for the creation of the lines in the .OSD files that are common to all applications in the suite. These lines include:

· The Suite Name – Clients prior to 4.0 used to save their user configuration settings in a file called “Settings.cp”. I know, it is an uncanny name isn’t it. Well this file was stored in the user’s profile directory (by default) but under a suite specific subdirectory that took its name from this <SuiteName>tag. This is not the case anymore of course (as described in “Inside the Grid” it is saved in a different directory and file name).
The <SuiteName> is still used internally by the SystemGuard and is still a required element. The recommended naming convention is::
Example:

Vendor_Application_Version_MNT e.g. Microsoft_Office_2003_MNT

* Note: The “MNT” portion indicates that when the application was installed during the monitoring phase of Sequencing, it was installed to the drive letter used as the client’s mount point, typically Q:\. As opposed to using the three character set “VFS”, which indicates that during this same phase the application was actually allowed to install to the C:\. This type of Sequence, known as a VFS of the Install will be covered in a future document on “Advanced Sequencing”.

· Title – This line has no real effective purpose in the .OSD files and as such my ego insists that I always put my name in this field.

· Comments – This line will go into the .OSD file as the <Abstract> field. We used this field to include every detail about the package and sequence possible. You should put in here the name of the application(s) being Sequenced, the block size used for streaming, did you compress the SFT or not, what operating system you Sequenced on, Service packs, and what media was used to install the application. To the degree that I should be able to look at the .OSD <Abstract> and know exactly what was happening at the time you Sequenced it. Consider this your mini autobiography.

· Server URL – This line is actually building the <CODEBASE HREF> line in the .OSD file. It contains the following elements:

· Protocol – Either RTSP (default) or RTSPS (128 bit encrypted secure). Now before you jump to the conclusion that 128 bit encryption is best for everything, please keep in mind what you are actually streaming. Application binaries only, not user data files.

· HostName- This is where you can enter the hostname, FQDN, virtual name or IP of a load balancer or the actual VAS that will be responsible for the streaming of that package to the client

* NOTE: The variable %SFT_SOFTGRIDSERVER% can be used IF you resolve that variable on the client using either a User or System environment variable.

· Port - It specifies what port my user sessions will use. The default is 554 for RTSP and 332 for RTSPS.

· Path - This field is used to specify the name of the sub directory under the Content share that you will save your package’s files into. This will build the relative path from \Content to the .SFT file to be streamed.

The recommended naming convention of this directory from the days when the product was under Softricity was:

Vendor_Application_Version_MNT e.g. Microsoft_Office_2003_MNT

Yes, this is the same exact name as the previous value of SuiteName. By using the same name, you can be thinking of SuiteName and actually be referring to Path and not mess it up. I would recommend you copy and paste it from SuiteName to Path. This will become very useful later when you are saving the package.

Example of completed line in .OSD

<CODEBASE HREF=“rtsp://%SFT_SOFTGRIDSERVER%:554/path/suitename.sft</CODEBASE>

Operating System

This next step in the Package Configuration Phase of the Sequencer creates the <OS VALUE> tags. This is a selection list. Move the Operating Systems you want to allow the application shortcuts to display on over to the right. Only those selected <OS VALUES> will even have the .ICO display as a shortcut. Others will not.

* NOTE: Most people will modify the .OSD file post Sequencing and remove all of the <OS VALUE> tags so that the package’s shortcuts will display on all supported operating systems. This was key prior to Vista being an available OSVALUE.

Phase 2 - Installation Phase

Your primary objectives at this phase of the Sequencer are to install, test and configure your applications. I recommend you run the applications here 3 times. I have yet to see an application that prompts for registration or activation or any of that “necessary stuff” after a 3rd launch. This is also the phase in which the Sequencer hides in the background and “Monitors” everything that the application’s installation is doing.

Everything you do at this phase is, for lack of a better term, “captured” by the sequencer and packaged in the SystemGuard bubble. That means that everything the typical application’s installation touches will be captured, but if you manually add files, etc. they too will be captured and placed into the virtual environment.

Sequencing Parameters

The first real screen you will experience during the Installation Phase is Parameters. Here you get to choose you Compression and Block Size Parameters.

Compression Algorithm: Allows the Sequence Engineer to compress or not compress the SFT file. If you chose to compress the SFT file it will be smaller and stream faster over the network, but will take longer for the application’s initial launch on the SoftGrid Client. This is because the decompression algorithm is CPU intensive. The default setting is “No Compression” and should be left unless the target LAN for streaming is excessively slow.

Block Size: Allows you to specify how much data is transmitted in out-of-sequence packets that are required when the user accesses part of the program that was not part of the initial launch data. Large values will cause larger amounts of the package to be sent per request from the SoftGrid Virtual Application Server, and will affect your network bandwidth. However large blocks may minimize the number of requested blocks, because more features are sent within each block. Using smaller blocks will increase your network performance but will cause slower delivery of out-of-sequence packets. 32KB is the recommended and default setting for the block size.

The Monitoring Phase

Once you click “Start Monitoring” that is exactly what the Sequencer will do. It will shrink into the background and watch everything that goes on around it. It will, conceptually, say “I see you putting files in C:\Windows\Sysetm32.” Or, “I see that you added some registry keys and values to the HKCU hive. I’ve got my eyes on you.” Lest we never forget that the Sequencer will later capture and place into the virtual environment everything that the application “touches” during its installation phase. It does not necessarily take a before snapshot as some packagers do, but it does a differential check of what was laid down while the application installed.

It is important during the initial “Monitoring Phase” that you do as much as possible as far as installing applications into the suite, adding service packs, making your configuration changes, etc. Also, what is essential is that when you kick off the installer for the application, and the application asks you “Where shall I install to?” you need to direct it to the Q:\ drive (or equivalent client mount point) and into a package root directory that follows the 8.3 convention.

Now, I know the questions that may arise here for some of you, so let me head them off at the pass.

Q: “Why do I need to install it to Q:\?”

A: You should install it to Q:\ because when the application streams to the client it may, and I say may, look to that drive letter again so that it can run. Now, even though inside of the .SFT file SoftGrid refers to the variable %SFT_MNT% so that it could conceivably run on any client with any virtual drive mount point defined. It is the application itself that hard codes the drive letter inside of its registry or a .ini file. When that happens the application will stream to the client, explode into the virtual environment and look to Q:\, yet the Mount Point of the client is actually B:\.

Essentially the application is looking for what it was always told to look for, yet when it gets there its ideal does not exist.

Q: “Why do I need to install it to an 8.3?”

A: Most, if not all, applications will generate a backwards compatible 8.3 directory name even when they install into a long folder name. If you do not even remember the days when we were limited by our directory and file names to an 8.3 convention please, do me a favor, and just skip ahead. You’re too young. Now an application such as Microsoft Office 2000 will install into a long folder of “Microsoft Office”. When it auto generates the 8.3 it would follow the algorithm of first 6 characters, a “~” and a number (1). So Office 2000 would be Microso~1.

Following proper sequencing practices you would revert the Sequencer back to its “clean state” at the end of every successful Sequence and start over fresh. If you were then to Sequence Office 2003, it would install to a long folder of “Microsoft Office”, again. And again, because the Sequencer is clean, it would auto create its 8.3 as Microso~1.

* Note: Now, do I guarantee either of these to be an issue? Of course not. You could come to me in 6 months and say, “Hey, I have sequenced a bunch of applications, never paid attention to your best practices and I have never had a problem.”

And to you I say, “Congratulations, you have dodged the bullet." You haven’t run into that application or combination that will cause the problem. Heck, I did a lot of experimenting and yes, even I Sequenced an application that installed to Q:\ in a long folder and streamed it to a client that had B:\ set as its mount point. Did I suffer? No. But I was lucky.

Stop Monitoring

Once you have successfully installed, tested and configured your applications into the suite you are now ready to bring forth the Sequencer and click the 'Stop Monitoring' button. Before you click that button and make a commitment to your Sequencer you need to ask yourself a serious question. “Am I really ready for this? Have I installed all of the applications that I wanted to? Have I added all of the services packs I intended? Have I configured and tested the applications?”

If you can answer “Yes” to these questions you may be ready to Stop Monitoring. Once you click “Stop Monitoring” the Sequencer asks you, “Where did you just install into?” You need to select here, and only ever select here, the package’s root directory on Q:\.

The Sequencer will then say, “OK. I understand you installed the bulk of your assets into the Q:\ drive’s Package Root, but like all applications today you also added a handful of files to the C:\ drive in those shared system directories like System32 or the Registry, etc. I will take those files and capture them and then place them into the VFS or VREG for you.” It does this even if you added those items or assets manually instead of the installer adding them.

You now have the opportunity to do it all again with the “Start Monitoring” button. You can add more files to the package. Now what it’s going to do is also add the osguard.cp (SystemGuard) file and the VFS directory under the Package’s root directory.

Add Files to the VFS

The next step in Sequencing allows you to manually add files to the VFS. If you know, either from a friend, neighbor, your aunt or uncle, or even your own experience that certain files were not added by the installer and therefore not captured by the sequencer to be placed into the VFS directory you can add them here.

Phase 3 - The Launch Application Phase

This phase is critical in that it extracts the icons for the shortcuts, is responsible for the names of the .OSD files and also arranges the .SFT into the streamable blocks of Feature Block 1 (FB1) and Feature Block 2 (FB2). It determines what components or combined assets of the package need to be in FB1 based on your actions here. So, although I did not coin the phrase, I often say here that you need to do your top 10 actions. For whatever you do here will be in FB1 and whatever you don’t use here will be in FB2.

Now of course it is not as cut and dried as that statement. For example, if calling on one feature ends up calling another dependency, even unknowingly to you, then that dependency will land in FB1.

Author’s Note: Configure Applications

This first step is absolutely critical in the icon extraction, .OSD naming, and name of the shortcut for the application. It is also where you can modify the list of File Type Associations (FTA's) and their properties. My best advice to a Sequencer here is to remove any shortcuts from the list you will not be publishing. This does not remove their assets from the package, merely their shortcuts. I would also recommend you edit any of the shortcuts you keep and verify that the correct path and name of the executable on Q:\ is listed, the correct icon is listed, the name, version and .OSD file name are exactly how you want to see them.

By doing these here you will have successfully entered the correct value in the .OSD file for the <CODEBASE FILENAME> tag. You will also have a user friendly name appear as the application’s shortcuts. And the .OSD file name of your choosing will be placed in the .SPRJ name. You won’t have to edit any of them later.

Author’s Note: Launch Applications

The next step in the Sequencing process is critical in the actual building of FB1. Here you will be prompted with your list of shortcuts for applications to be published as well as two little buttons in the lower right corner called “Launch” and “Launch All”. Now, as strange as it may seem, the “Launch” button will only launch the selected application, one at a time. Whereas “Launch All” will launch the first, you do your “Top 10”, then as soon as you close it the next application will launch almost immediately.

The worst thing I see people do here is to launch an application and do nothing in it. They launch it, get so excited that it worked and then close it. They now have a very small FB1 and although it streams fast, everything they do is going to cause an Out Of Sequence request from the server.

Author’s Note:

I would answer, I’ll tell you a secret. If you don’t launch anything here, and I mean nothing. Just click next. Don’t launch a thing. Did I say that already? OK, good. If you launch nothing here, then everything will be in FB1 and you will have no FB2”.

That's it for Inside the Sequencer so until next time, happy sequencing!

- Sean Donahue

Comments
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment