Uncategorized

Citirx Universal Print Server – More Zebra label printer troubleshooting tips

2015-07-09
/ / /

Continuing on my previous post I was troubleshooting some issues with some Zebra label printers.  I thought I had it working by switching the rendering path to XPS.  This did allow the printers to print – or so I thought.  It turns out that some of the older Zebra printers we had (LP-2824) were not printing the labels correctly, a newer LP-2824 PLUS was printing correctly.  The LP-2824’s were scaling the labels down to 20% for some reason.

In order to capture this so I wasn’t wasting legions of paper, you need to turn on ‘Keep printed documents’ in the ‘Advanced’ tab of your printer.

On your print server (not the client), this option will store the spooler files (SPL) here:
C:\windows\system32\spool\printers

Generally, there are two types of formats encapsulated in a SPL file, RAW and EMF.  Citrix provides a EMF reader in ‘cpviewer.exe’.  This utility is located in Program Files (x86) and is used like this:
“C:\Program Files (x86)\Citrix\ICA Client\cpviewer.exe” C:\00167.SPL

This will bring up a preview.

I setup two scenarios for printing.

Scenario 1 – Printing directly to the print queue with the “ZDesigner LP 2824” driver
Scenario 2 – Printing through the Citrix Universal Print Driver via UPS.

Trying both scenarios caused my cpviewer.exe to hang/freeze.  This is where I learned the cpviewer utility ONLY works with EMF-type SPL files.  Trying to read a RAW file will cause it to hang.  I was able to verify it was RAW by looking at the preferences for the print driver:

 

It turns out that ‘Printer default’ and ‘Raw’ are the same value.  Selecting ‘Enhanced metafile’ and reprinting to that printer created the proper SPL file that I could open in cpviewer.  With this I could now see the issue the users were reporting:
Left print is direct to the printer, on the right is through Citrix UPD.  I’m missing the barcode on the right.
With the ZDesigner driver, if I forced the ‘Enhanced metafile’ in the preferences, all the Citrix UPD prints lost their barcodes.  If I set the Citrix UPD to XPS and the Zebra on RAW it printed with a barcode, but the scale was still horribly off (same as the picture above).
I tried adjusting almost every option available on the ZDesigner side, from the paper size, dpi, different stocks, etc.  It consistently turned out scaled down.  If I adjusted the margins it would move the graphic around but nothing would enable the graphic to be the correct size.  I looked at the Citrix UPD advanced settings and changed the paper height, width, dpi, scale, print quality, orientation, etc. Not a single affect was made except for orientation.  At least I knew the settings were applying because of that.  Orientation didn’t make a difference in the scale, just made the tiny graphic vertical instead of horizontal.  At this point I decided it had to be driver related.  I downloaded two different sets of ZDesigner Zebra drivers for the LP-2824, the latest and the last major version release, installed both but the exact same issue still persisted.
Searching for others that may have had the same issue or something similar I found a link to another company providing Zebra label printer drivers, Seagull Scientific.
With nothing else to lose, I installed and configured those drivers per the original spec for media, etc.  Then I printed and checked the SPL file:
Success!  Barcode is present!  Scale is correct!  Format is pure EMF from Citrix UPD to barcode printer, no XPS anywhere, no RAW anywhere!
All that said, this is a ringing endorsement for what Seagull Scientific has done with the Zebra Barcode printers.  Their drivers *just work* as opposed to the ZDesigner drivers.  If you need to print to older Zebra printers, heck, probably for all Zebra printers, use Seagull’s drivers.
Read More

Citrix Universal Print Server – Troubleshooting printing blank pages or inconsistent printing.

2015-07-08
/ / /

We have an application that is hard coded to map printers via a UNC path.  This is the bane of a Citrix admin whom wants to minimize the number of drivers on the XenApp server as each UNC connection can prompt for a driver install (this is how our environment is configured).  User’s click ‘Install Driver’ and boom, your Citrix server has another driver on your server and another point of possible instability.

Citrix has attempted to solve this using the Universal Print Driver (UPD) but this just maps printers from your local system to the Citrix session.  Each printer is given a unique name and each queue is given a unique port as well.

Unfortunately, this makes it impossible for our hardcoded app to use a consistent printer as these queues and names do not exist unless we install them locally.  If the program displayed a simple print dialog this wouldn’t be an issue but it is not coded that way.

Fortunately, Citrix has come up with a *fairly* elegant solution: Citrix Universal Print Server (UPS).  How this works is it forces the mapped network printers to come across using the Citrix Universal Print Driver.  There are two parts to this, the Citrix UPS and the Universal Print Client (UPC).  The UPS goes on your Windows Print Server and the UPC goes on your XenApp servers.

XenApp server

Windows Print Server

To enable the UPS functionality and have your network printers use the Citrix UPD you need to enable a Citrix group policy object on the XenApp server (that’s why you see Citrix Group Policy Management (x64) 1.7.0.0).  If you have a version older than 1.7.0.0 then you won’t have the relevant policy available to you:

Setting this setting to either “Enabled” setting turns on the UPC feature.  For any network printer that you map to the Windows Print Server with the UPS it will use the Citrix UPD.  To verify this, go to your XenApp server and map a printer from the UPS and look at the driver.

UPS in Action.  Note the driver for the network printer is “Citrix Universal Printer”

Ok, so with UPS installed and working we should be good right?

Right?  🙂

Well…  It turns out that our label printers were printing out blanks with Citrix UPS.  To determine if it was truly the UPS causing my problem I enabled printer mapping, added the network printer locally complete with the native driver and launched my app.  This mapped my local printer into my session with the Citrix UPD.  I tried printing and…   nothing.  Just a blank label came out.

To troubleshoot this process, Zebra actually has a good document on determining if your printer is rendering/printing correctly by printing to a text file.  If you have a new enough Zebra printer installed you can actually use it to ‘preview’ the label so you don’t waste paper, AND you don’t need have a label printer physically present beside you.  Older Zebra’s don’t seem to have this functionality (LP 2824 I’m looking at you!).  I had a PDF file I tried printing from PDF Architect that output to the text file.

So, what did my print job look like?

CT~~CD,~CC^~CT~
^XA
^PW445
^PQ1,0,1,Y^XZ

What does this look like on the Zebra?


Well then. Curiously, if I printed the same document from Adobe Reader it came out like this:

CT~~CD,~CC^~CT~
^XA
^PW446
^FO0,0^GFA,23296,23296,00056,:Z64:
eJztmrFuE0EQhvecCw4oIha6woQliUQELUJISekCUacIissAViJRWY4TWxQoQhSUKShc5jFc5jGucBHxCFQnFNnsnk1zV/jmMzqFaP4uxaeZnd1/Z24dY1QqlUqlUqlUKpVKpVKpVCqVSqVSqVQqlUqlUqlUKpVKdTu1OfmrsYirmdCYuvlgTOXuck3IJZCLIdcnXAvm2YXcNtyHLq8LirdAnohrQe51yXlWJxN6Xv6LfSib2y//nKH7jPqd+q8F/b5Anuj+7MJ6Ot8OS+4rBfbBQo7GK5uj63uY+Xs2L/2cxz2AXDbeLM8vsC6fbxuX24dlGG8p5Tqlre99MS63f28h14PcXjFuDca7n+U+Om4dxHvluE1cl7n7nuMOHbcxP956ltsplmeU5bopNzfPHNd23NP53EaWewn7w1Ho+5HcDzvp95GcO3HcZPJbzFWhbyuwLv6cDcwntD6S5yPIncF7sA3j7X1jHI3n9+Ex2L/lljeJvC6dN4X8nuOOt9n6trqF7okc5+vyBMSLit3XOe6wxerS6bK6HKd1kfuv576r7DWcXy7h/Hkt5ui722LvdWO4vq9yrg25PcjRPBdZX3xD+4qcewf7mMuzTr43z+D32EFobCz3Q+00NFEC/NeD77SuLjZpyDk3h6wCv/tztpIAbs3l2Qe+dfUMof/qCfORjQH33O8D4M5gPH9e+sC3Dei/e5B7Af3Xg9zJ7Xy3yaroO8q/ircYx+6JMucQz9UhZ+vg/nRcVPIcYiG3Sriau+fhvUvzDMkcssXnAkve59N+y+5BS/x36ucCcK4PfJ8G/uu4c70L8nTzhB0CH634ejLfrpK69Hw84Nt96IdncC7o+P4OONenwyHzH5qXGv5cA9/6OZL4YQv6qA37XxvGS/sR41BdDM/zLs8Fi81ZbC6A7xPBFfzuP2ccjReMYJ4RXR+ZC1yeDfI+4bgY+uGc/a4djODv6D9Y3wyumsx/aO7xfZr5KBjA9Y3IXODPC5kL0vcQ6CPSp128EXzX+E7eGXyeZA5x8RoJ8+2A+c/dZ6VzJf8/A/k9oOr7n/x3yin3q7w8034LubH895XpdzjlWJ7Mf8YMWDwL86zFN2x9sD/YJvz/l0Tso2DWx6Tc8oXn+uJzvZRyyaWUC2f/ty3lqtP1iX2UxouG4vVN6ynnQl+XKBmzejbZuY4SMVdJ17cr9m1al3oMfQv7u4lvjsg+AB+Zi2kfk96fFdj/Av9OhDiLOFcX1DeXLiz8np5y0v1TqQroD3Suisg=:DA24
^PQ1,0,1,Y^XZ

Label looks good
So, when we print from Adobe Reader we get the expected result.  But if we print from PDF Architect or directly from our application we don’t get anything and the data is missing entirely!  This is a strange issue indeed.  The Zebra driver shows its supported formats:
RAW or EMF…  The Citrix UPD has two modes, EMF (standard “Citrix Universal Print Driver”) or XPS (“Citrix XPS Universal Print Driver”).  I would assume EMF to EMF would be the way to go?
By utilizing the ‘printer mapped’ UPD, avoiding the UPS, we can enable ‘Print Preview’ functionality and look at the EMF file as it’s placed in the print queue.  Here’s is what I see:
Adobe Reader on the left, PDF Architect on the right
Well, there is content being sent to the print queue from both applications.  Adobe Reader looked slightly heavier in its lines vs. PDF Architect but both SPL files had content.  This is still very confusing why Adobe Reader actually prints but PDF Architect does not.  Maybe it’s in the way Adobe Reader processes its file?  I don’t know.  Maybe there’s a way to modify EMF on Citrix?  It turns out, you can.
Citrix offers the ability to modify the way it’s EMF driver works by reprocessing it.  You can enable this feature via Group Policy.  
Reprocess EMF for printer
Did it make a difference?  No.  Still a blank page/no content for PDF Architect, Adobe Reader prints out fine.  
At this point I was at my ropes end and decided to grasp at straws.  
The Citrix UPS also allows you use the XPS driver instead of the EMF driver.  This would force a completely different rendering path, XPS -> XPS to GDI -> EMF -> GDI/DDI Driver -> PDL Print Device.  We know it has to go this way as the Zebra driver only does EMF or RAW and the UPD will only output EMF files.  To enable XPS printing I changed the Universal Driver Preference to favour XPS.

 I reprinted to XPS from both PDF Architect and Adobe Reader.  Again, Adobe Reader showed up darker but again there is content to be printed from both spools.

PDF Architect on the left, Adobe Reader on the right
And what did the print queue show?
PDF Architect:

CT~~CD,~CC^~CT~^XA^PW446^FO0,0^GFA,23296,23296,00056,:Z64:eJzt2z9oE2EcxvHnLm8uF7nYawgaJYQjFLFOwdHpUkWDiH87OjQY6+JmcXI4Q4QITTlxcE1shg7ipOBmhg4dRRzEKQiCnRx1q2+S/rGhubw5qgR8PkO45O7L+7vkcpkCEBERERERERERERGpceBZ0GC6ltwW6l2+tbboNm/W3RWx3H6PC0XFLtVae51b/VjvVF6ecZo3ps1QU6uxg3fvnK3mTWqXcL6jChG1nzoKnV7KVNu9LWu2DC+Z0pKbKuvpm61WO8ycP+5+2+7mgY05IRS7PSnZXa7ihO2P142aMx3Y9fcWSoNd8nzgVSyudB+f33k82B1T6LTPuUM8v8Av6qR1esgu55r24C6VznGfhVpv17zvhum0T1+6nbhujrle38UXtRHd9NHqAd3oOQe7uFxoBgn5NdDdhtFQnjOegfEWiWVkI8UFYz2wEy4wZNrgrukb6903MDNeF8MHHaflk7I8sOaZ/Yuu4uPcgkC096Qw6vyOdKBtX6w+zjpV+buo1I0z59/o8ril0mmdKWTRmfJ+aZ0sprBk44HSeieL8iUds6KCgo+NuuqcWbNhIw7NmEOhDW/FU+zSZu/WqMk15bHezmU0Kfezf9lFneO9zdiqfNAzr2rJU3vd1UI8PaS7dv9S/5h7QOTrI2vr9s/do8TDJ6V3Q7pF3d03l7V/zvyQOWNbKg5YDwEm6XNgx44dERERERERERERERERERERERER/Wdsa4y/Fv0hMhOuM96UQ3XwwmVEREREREREdFh+A05IoVY=:EC01^PQ1,0,1,Y^XZ

Adobe Reader:

CT~~CD,~CC^~CT~^XA^PW446^FO0,0^GFA,23296,23296,00056,:Z64:eJztmkloE1EYx99MJnHE1CSCVgSbBEVxQy81WtBqpZViEREUitYISsGDeBAsepnXGhcUN+xBEDXFS/FgsaKHSiEIIiiYVBEqGlLXlmJd2yRVk/FNlppM0mQSRS38f8yWN/PL9711cgghAAAAAAAAAAAAAAAAACYo4mLLuguigSyr2zDkfa8L9oc1iiV+6eTQa2fpvd59O/aGmzqWafQa/NL5jpFA6dtnQ4/2hIP9Wr0Y5kIeJqRSVhFVF8ShKk+Vky15YWC7ENsIxxxOHe9fe2LSK3lyXV8hVcuPF60tKJ7R6dVPkd7u/y5ribfk8aC/mDznNjxIesNuYbRCX3FwpZ1oyPM4oQnvsudI2039yY2mGwXVr7A8NXvlh7pyefrNzGmOPs3wHN8GEldimjc14fmYd8x5IMOrDKQN30jsGPpVwG5HWGEks368Kk8+lmR6/dZkaRdeVZLpkeweZSfWbZSmxWOfBMo8yuLRbF6M7tqtp4rJ82Nt6Mfv1K8gT0zxuu7cZZIoxjxRc7w5Dz8q3ui2mrzxdKn93hfPU77YmMcrb9qlDBCnFJJkaczLXz+H9Eo5UWVjB1upr8XafXTWYM1z72eXqdUV9zy56qes2DbrJr70h2Hq9sZaKeQqCedsF6HdbWp3EzMXLqwfJq3vm3S/j3mfiO3D8ipH9TzdtRpuhk9wLHQRE+GO7qxqU3srlO8XGYTMZB1pk6P80qjB5DVwUY9x1VcjmUK5M+41L9VeZXKWBeRfM1GZcXKEfZaUCSkpRdm9/ORrT1W76Ov4FUqbZO8HGvfYDEzxKBUodW1vGWhmPduc6Y2hxLNHZndW9gStPlkXse629shk3PUzLU97ydkv9voyc+8Zfvq5N5Z6E7utyRPNLXZuhpme5s0WwcIZc3piijfzxAKVN1lLPJ+VX829s5Kgrq9MKOOGNeZpyxif43q6kDM+JGLjRWLTMCJLTZLUFFu5lTtsD2XxNI0XmpnnlpHvHuVyGlsJ53f6b8ndl8ae0kdut74gmuqXhpA451uX1CTfTLneR2KOeJP/XJ5/3aNJj/7fecKb0N4YBXnFvo+siZ+cCQJaPQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEw1P4m/IhRK4erYo78rh4uIZirIAAAAAAAAAAAAwcfkJ2Wk8DQ==:9DEC^PQ1,0,1,Y^XZ

Success!  It appears changing the rendering path to XPS works in resolving the data not getting rendered.  When printed from the application with the EMF driver and a blank page was spit out, I tried again with the XPS driver and it worked successfully:

CT~~CD,~CC^~CT~^XA^PW446^FO0,0^GFA,23296,23296,00056,:Z64:eJzt1n1ME2ccwPHnaeFg7hbKusnVmOGcmjkmNsY/DM0sJg7nZpZFo0usstZMNhFlL5lxCt6VZIU5E7YFR30DMqO4SRAZqQsRfFiJss3Ejf6hMAqaxS3dnG0Gdmppb3el2BJKez224bbfJ+FycPflueee9lqEAAAAAAAiJBGc+1yuCnHoDdy5cXZqxouodbkqm4vXUdddK0s+aPlo+idzmvZ/szz304qTVRXmZ+OOpxhYubFw6QHPZv/CurZpa81Pnfj4kZOKtSRel9rz5updv78y1z93/pJjZQWM9usnki5qTXGvMyRJ4nmTkcnLglRR/hfmIn8j4oYRfujgr8Et/i91Bad7mjQHLwSK+gLXt92W3r31falW8+2K7U/3e+v5E7G6Aw35WXdHY7LpdI9Hs1cYr4ot8F6N1R1u2aHLIffmlyTOTyVhftaGDRHjiRuJ9wVHzg8v+hIxN3VX6Aubti1uln5fsMOKNDdndNE/Hm3LaElg/VY3IU2XzkrbjQ2PNspZ99Tw/B72z/tOatdrFLeKge4bGKmdi65I7QyzxC3lHBwWutJ5H0rtulGwq3a8jmW/byfxfqeiXic1uhNxP9HIlhlZh39XlzyYZzDoZHTu1/ZseTfxjrLlGX545/6/L5FdWeuZSxZxp6Z6fksCneWXcy+MdIPPlCTSfd57KU/cOWKbaDx1367yca9aCfObcWh3yvgu2Ykope9XXPZFjrHzp8btOQzlqLvXzRTHO7w+8jpHnh5cipOjlJ+5cJmvcNZ5r7+4kKH662LNL9Ql70eUwufCXPNOY+fm9sKdDHWGi9KpjxWh7G6b+Fc8nMD6Ta8PoKVr+GC3IYEu470htOCru6PjmdsbvVRavq3DXHqKI8p1NYjJer5GKLYKZ9BdjHpZ9PmZiwIHqbS3A8vM7laOKPp6EbPQsFc4tkA448GLjPraBN25Ng81rX8Im9uyEVFerkJM9nqrcCxLOOOhCkbZMdXPwdD6Rb+f3YTujfjclNzlE9oQsysfsv9h0TsyBypd5W7CHtefZfhVe4bX1QkfEbG6Su+KgIXt0ftqb1T6Cd/MDmn4V/m+4OFY3b7F5zMtJod2wLpln57Yj5vOaspX2Yfjd1qKoUyctsNqpLXEjkycxoLs9H3XVXpSblMsp++ovZrmITxiOU0A8X9fN8G6/0Xd+OeZhNc1I7MTr/PlYt1WErrOy03i98jZTyrefwBztjFfbWiCU61zXgrPjy3Z8Vtu6JhTeMjg6lv6n10u1lfvGdPV8jVu3hPuiot3G0bHqxYehvjQrVMFd+6wg+1ju4CzP8sf7v7x+xJ1/cajw7sx1h066KCDboq6TBkPQX4S37MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+P96DKkel9Op+fRrcrqZ7nSTnC7djYmcDi2RVQEAAAAAADBF/gTXZRgw:7C79^PQ1,0,1,Y^XZ

To that end, I am concluding my work.  Unfortunately, I do not know why Adobe Reader always worked without issue where two other applications did not.  When on EMF mode, I could send a test page to the printer via print properties and it would have the full content, I could also print from notepad to the EMF queue and it worked just fine.  For some reason, whatever path PDF Architect and my other application uses to print to the EMF driver just didn’t work.  The Citrix EMF Viewer would display content, implying there is data.  I do know there are several versions of EMF (NT EMF 1.003-8) you can choose on the printer processor properties, but it appears the Zebra driver ignores those settings in favour of it’s selection I posted previously.  Forcing a different print processor (HP or Lexmark) in addition to an incompatible print processor type (TEXT/XPS) the Zebra driver will still work.  So maybe it’s a EMF version compatibility thing and whatever version Adobe Reader is passing works?  
Read More

AppV5 – Prelaunch Script for Citrix XenApp 6.5 applications with varying environments

2015-07-07
/ / /

We utilize a lot of pre-launch scripts for our AppV5 applications that we use in our Citrix XenApp 6.5 environment.  They become a necessity very quickly as AppV5 stores the executable down a very long path.  Citrix XenApp 6.5 has a maximum launch string of 160 characters and this maximum prevents a lot of applications from working if they require parameters to be passed to them.  An example looks like this:

This launch path is too long for XenApp 6.5.  The string will be truncated and the program will fail to launch properly.   We have several environments that work with the same package files so we set them as variables.  To get this package to launch properly we create a prelaunch script that looks like so:
At this point we set our application to point to this CMD file.
And the application will launch with the shorter string with the ability for us to change the environment and location quickly and easily.
Read More

AppV5 – Recipe for Epic 2012

2015-07-03
/ / /

Prerequisites:
AppV5 – Sequencing first steps

Recipe:

I create install.cmd files for all of my applications so that, if required in the future, I can re-sequence an application quickly completely through script or via one of those ‘PowerShell AppV5 automated GUI’s’.

install.cmd

Supplemental files:
None
 
 
1) Select ‘install.cmd’ and click ‘Next’
2) Name the package and click ‘Next’
3) Let the install script do its thing (note the clock)…

4) AppV5 – Post install sequencing steps

5) Review for any extra registry keys/files (generally there are none or very few) and remove and save the package.

6) In order for Epic to launch in a reasonable amount of time, registry staging must be done.  Without a pre-executed registry staging, first launch performance of Epic can take hundreds of seconds.

Read More

AppV5 – Recipe for ScreenTest III

2015-07-03
/ / /

This is the most recent app I sequenced and a good template for how I am going to do my recipes.

Prerequisites:
AppV5 – Sequencing first steps

Recipe:

I create install.cmd files for all of my applications so that, if required in the future, I can re-sequence an application quickly completely through script or via one of those ‘PowerShell AppV5 automated GUI’s’.

install.cmd

Supplemental files:
odbc.reg
 
 
 
1) Select ‘install.cmd’ and click ‘Next’
2) Name the package and click ‘Next’
3) Let the install script do its thing…

4) AppV5 – Post install sequencing steps

5) Review for any extra registry keys/files (generally there are none or very few) and remove and save the package.

Read More

AppV5 – Post install sequencing steps

2015-07-03
/ / /

1) Check ‘I am finished installing’ and click ‘Next’

2) Wait out the ‘Collecting system changes’…

3) You may choose to ‘select’ your application and click ‘Run Selected‘ then click ‘Next’

4) Click ‘Next’

5) Select ‘Customize’ and click ‘Next’

6) Select ‘Force applications to be fully downloaded’ and click ‘Next’

7) Select ‘Allow this package to run on any operating system’ and click ‘Next’

8) Select ‘Continue to modify this package without saving using the package editor’ and click ‘Next’

9) Click ‘Close’

Read More

AppV5 – Sequencing first steps

2015-07-03
/ / /

I follow a specific pattern when sequencing my applications.  I’m going to put the same first steps for every application I sequence here.

1) Open the ‘Microsoft Application Virtualization Sequencer’ and select the menu ‘File’ then ‘Load Template…’

2) Browse to and select your template.

3) Click OK

4) Click ‘Create a New Virtual Application Package’

5) Click ‘Next’

6) Click ‘Next’

7) Choose ‘Standard Application’ and click ‘Next’

Read More

Setting up a PVS AppV5 sequencer

2015-07-02
/ / /

A typical workflow for sequencing an application is something like this:
1) Take a snapshot of your sequencer (odds are it’s a virtual machine [VM])
2) Power up your sequencer and sequence your application
3) Move your application to your system, test it, try and catalog all problems.  Revert your VM snapshot and go to step 1.

In several environments that I have worked in, this is a bit of a hassle as most environments implement the ‘Machine Account Password Expires after X days’.  So after that time you either need to delete your snapshot, power on your VM and rejoin domain then start over.  This gets really cumbersome with multiple sequencers to take care of.  In addition, at my current environment, we require Windows Update be up-to-date and applied to all machines, including sequencers.  Reverting a snapshot to before Windows Update will, sometimes, cause Windows Update to start upon the desktop when you login.  There is a lot of overhead and hassle to maintaining snapshots, though it is better than the alternative of reinstalling the operating system each time you want a clean sequencer.

There is a very elegant solution to all of this I have found that also allows me to sequence super fast.

Citrix Provisioning Service (PVS).

Citrix PVS works by managing the Active Directory machine account password for me, so I never have to reset it again.

With Citrix PVS you can create several sequencers from one vDisk.  This ensures consistency and avoids tech’s having their own VM with their own nuances.

Citrix PVS allows you to create a version of the vDisk and apply Windows Update’s.  Automatically, all of your sequencers get the updates applied.

With ‘Standard Image’ mode, the VM now becomes ‘non-persistent’.  This means if you reboot your VM it will go back to the state it was when it was last powered on.  PVS requires a ‘persistent’ supplemental disk attached to the VM for things like the event log, page file and the write cache files.  We ensure the supplemental disk is large enough so we can locally store application installer files there (temporarily!) then the installer files go onto a fileshare that has regular backups, etc.

Starting with Citrix PVS 7.1 there is a new feature called ‘Cache to device RAM with overflow on hard disk’.  By utilizing a memory sizing for your sequencer VM that can run the operating system *and* contain the largest application in total megabyte size, your sequencing can go super duper fast!  Sequencing to the operating system drive with this PVS feature will actually write to RAM, which is significantly faster than disk.  This shortens sequencing times significantly.  You will need to ensure your cache size is large enough for your largest application or else the overflow to disk will slow you down.

But won’t this setup fail to work with AppV5’s ‘reboot’ feature?

Starting with AppV5 you can now *reboot* an application in the middle of sequencing and the sequencer is supposed to be pickup after the reboot and continue to capture.  So far, I have not had good luck continuing sequencing after rebooting with the AppV5 sequencer.  I’ve found, with a 100% success rate *so far* that a reboot is not necessary.  I’m aware that applications like Chrome show that a reboot can make a package work successfully, but I prefer to figure out what it does post-reboot and just implement that in the sequence instead.

By avoiding doing reboots we are not missing that feature at all.  In cases where it is absolutely required
I have a workaround.  I create another vDisk version in Maintenance mode

And set my Sequencer VM to Maintenance mode.

This turns the VM to a ‘persistent’ state for this duration.  Once the sequence is completed I delete the version and set my VM back to production.  The caveat here is only one VM may use the maintenance version at a time.

What should I put on my PVS Sequencer?

As per my previous topic, I believe you should try and minimize the visual C++ runtimes that are different from your sequencer to your VDI/XenApp server boxes.  If possible, make them identical.  This prevents AppV5 from usurping installed versions of this runtimes when pushed to your VDI/XenApp servers.  They may still get usurped if an application has a different version installed then what you have on your box, but I strongly believe in minimizing it if possible.  There may also be a (small) benefit by speeding up your application first launch experience by removing some minor registry staging.

Here is what I have on my sequencer and a clipping of some of the software we run on our XenApp servers:

All of the software on the Sequencer

A small clipping of software on the XenApp servers

With the PVS sequencer you have a static, persistent disk that you can use to locally store installer files, notes, AppV template file, whatever you need to help you get sequencing.

A little snapshot of my persistent disk

How do I sequence with this thing?

For my sequences, I usually create a batch file that lets me do a silent install of the application and any shortcut configuration.  I can then use this batch file to do a completely scripted sequence if required in the future.  Otherwise, sequencing is identical to how you would do it previously, but you cannot restart the system!  Restarting will result in a clean sequencer coming back up (after all, that’s the point!)
Read More

AppV5 – Be mindful of application integrations

2015-07-01
/ / /

When you sequence an application in AppV5 there are special keys that will be ‘integrated natively’ into your system.  These keys are HKLMSoftwareClasses.  There are numerous things that can be integrated and these include things like File Associations or, even worse, libraries.  I believe a ‘best practice’ should be to make your sequencer and target platform as close as possible by installing the same software on both if you can.  For example, for all the Visual C++ native runtime libraries on your target device have that same software on your sequencer too.  If they differ than the natively installed package will be usurped by a AppV5 package’s deployment.

AppV5 Package has usurped a natively installed control

The differences in the two files
This can cause issues if you are not careful about the deployments of your AppV packages as well as Windows will now natively use some libraries that may have security concerns.  This can also cause some issues if poorly written applications have specific version requirements and if multiple packages are installed with overlapping files/keys, it appears the last loaded package wins.
In one particular example I made an ‘Internet Explorer’ package that changed the registry keys within IE so it would identify itself as IE 6.  Doing this resulted in the http key being changed as well:
This resulted in every programatic launch of a URL to launch iexplore.exe within a different AppV bubble.  This was unexpected as I do Internet Explorer customizations within my packages so that when you launch IE you have the IE customizations for that app all with you.  This one package caused issues as http launches to went into this package as opposed to the package you were in when you launched it.
So, if you have a machine that loads multiple packages, be aware of these potential issues.
Read More

Crystal Reports 13 and AppV 5 have issues

2015-06-26
/ / /
Crystal Reports 13 and AppV 5 have issues.  Crystal Reports 13 (CR) installs to some long paths which fail when loaded AppV5 tries to ‘integrate’ them.  A blog detailed shortening the installdir path to something much shorter but CR still failed for me.  My path without modifying the INSTALLDIR property was:
C:\ProgramData\Microsoft\AppV\Client\Integration\14FA6B99-E7E2-4F5A-B7FC-4B024DE1705A\Root\VFS\ProgramFilesX86\SAP BusinessObects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
224 Characters.
With the modified INSTALLDIR it was:
C:\ProgramData\Microsoft\AppV\Client\Integration\14FA6B99-E7E2-4F5A-B7FC-4B024DE1705A\Root\VFS\ProgramFilesX86\1\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
206 Characters.
This still failed.
The symptoms were errors in the application:

 

‘The type initializer for ‘CrystalDecisions.CrystalReports.Engine.CRPE’ threw an exception.
Attempting to register the DLL’s related to these resulted in these errors:

 

[Window Title]
RegSvr32
[Content]
The module “clientdoc.dll” may not compatible with the version of Windows that you’re running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.
[OK]
Since AppV5 integrates HKCR keys natively into the system, if you can’t register a DLL via a long path, then you will error with CR.

 

You can actually replicate a similar error by trying to ‘install’ CR with a long path, so it’s not AppV5 that’s at fault, but apparently something within the CR DLL’s.  Trying to install to a path similar in length to the AppV5 path will fail:

 

So what is the maximum length CR can be installed to?

 

259 total characters.  At 260 characters or greater the installer fails with an error similar to the above. I’m not sure why the AppV5 path is significantly less, but it is for some reason.
In the end my path was:
D:\AppVData\PackageInstallationRoot\14FA6B99-E7E2-4F5A-B7FC-4B024DE1705A\05D9D6C9-B77A-4376-94C6-C13E4764A8B0\Root\VFS\ProgramFilesX86\1\C\Common\X\win64_x64\
158 Characters.
To do this I needed to modify the SAP Crystal Reports 13 file with a MST transform file.  I did it by doing this:
Step  
Action
1   1.
Copy the ScreenTest III installation source files to a temporary folder C:swinst on the sequencing machine (WSAPVSEQ07 – Windows 2008 R2 SP1 in this case).
1   2.
Install Orca.msi
1   3.
Launch Orca and ‘Open’  the Crystal Reports version
1   4.
Choose Transform from the menu > ‘New Transform’
1   5.
Select ‘Directory’ and find the first instance of ‘CrystalR|Crystal Reports for .NET Framework 4.0’
1   6.
Double-click ‘CrystalR|Crystal Reports for .NET Framework 4.0’ and copy the field.  Select the menu ‘Edit’ > ‘Replace’ and set ‘Find what’ as ‘CrystalR|Crystal Reports for .NET Framework 4.0’ and ‘Replace with:’ as ‘CrystalR|C’
And click on ‘Replace All’.  If you get prompted:
Select ‘Yes’.
1   7.
Repeat the process for ‘SAPBusin|SAP BusinessObjects Enterprise XI 4.0’  to ‘SAPBusin|X’
1   8.
Select ‘Registry’ and sort by ‘Value’.  Find the first instance of [INSTALLDIR]
1   9.
Do a ‘Replace’ and enter ‘[INSTALLDIR]Crystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0’ for ‘Find what’ and ‘Replace with’ as ‘[INSTALLDIR]CCommonX’

And click on ‘Replace All’

1   10.
Result:
1   11.
Select the menu ‘Transform’ > ‘Generate Transform’ and save the file as something like:
SAP_DIR_Short2.mst
1   12.
Select the menu ‘Transform’ > ‘Close Transform’ and exit out of Orca.
You can now install SAP CR with a command line similar to this:

Read More