Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like


1,600 views

I got some interesting questions from a user today regarding TIFF images on a Windows 2003 based Citrix environment.

This user has an application that works with scanned documents and for each document exists both a pdf and a tiff version in the application.

By default the TIF (and TIFF) file extensions are linked to the Windows Picture and Fax Viewer in Windows 2003.

The user told me that some time ago she had an extra toolbar where she could perform some extra operations such as making a selection on TIFF images.

At some point in time this mysterious Toolbar disappeared and she was never able to get it back. She reported this to the helpdesk and the system administrator but they were unable to resolve this.

I hadn’t hear of this toolbar before but a Google Search led me to this page which explains the toolbar in question which is called the Annotation Toolbar.

Read the rest of this entry »

2,614 views

Another post on something that happened last week, this time it’s about a Java based Application again.

This particular application wanted to download three DLL’s from the Webserver to the Java bin directory.

This presents us with several issues on a multi user server such as a Citrix of Terminal Server:

  1. The user does not have write permissions in this directory
  2. If we we give the user write permissions here what happens when the DLL’s are in use by another user?

I assumed that if I preinstalled the DLL’s the application wouldn’t try to overwrite them but that didn’t work.

Then I monitored with Process Monitor if the Application wrote some kind of check file but at first I didn’t find anything.

So I decided to use the CorrectFilePaths shim to redirect the DLL’s to the user’s homedirectory (see Using the CorrectFilePaths shim to redirect an ini file to a writable location for an explanation).

Read the rest of this entry »

4,518 views

A few days ago I was packaging an application that was writing an INI file in the application directory.

If you have read my earlier article, Using the CorrectFilePaths shim to redirect an ini file to a writable location, then you will probably think: create a nice shim and redirect that ini file!

But this application had a few challenges, the first being that it writes %COMPUTERNAME%.INI. The application’s developer probably assumed that a user is bound to one pc and that no other user’s use that pc.

To solve it we we need to catch all possible computer names (it would be nice if the CorrectFilePaths shims was able to accept wildcards and environment variables).

But it doesn’t so it means we have to add a parameter for each possible computer name. In my case that was doable because I have only 8 Citrix servers.

So I created a Fix using the Application Compatibility Manager as described in my previous post.

However it didn’t work, so I started to trace what happens.

Read the rest of this entry »

1,986 views

I was writing a test program that will perform some actions when a USB Memory Stick is inserted.

When this happens Windows send a Broadcast a WM_DEVICECHANGE message.

The wParam member of this Message contains a (pointer to) a DEV_BROADCAST_HDR structure.

if the dbch_devicetype member of this structure is of type DBT_DEVTYP_VOLUME then we can cast the structure to DEV_BROADCAST_VOLUME.

And finally the dbcv_unitmask member of that structure returns a Bitmask containing the Drive Letter.

A fast and convenient method to convert this Bitmask to a Drive Letter (the first found) is the function below:

8,352 views

Today I noticed that a recently added Application to the Citrix Test environment added a Macro to the Office Startup directory.

When a user launches Word he will get a popup because the Template (.dot file) was not signed:

OfficeMacro

It would have been a lot easier if Application Vendors sign their stuff because in that case I could have just added the certificate using Group Policy (yesterday’s post describes how to do this).

Application Vendors usually tell you that you should lower the Macro security in Office (or Word in this case) to Low to get rid of this message. But I think there’s a better solution: we will sign the .dot file ourselves!

Read the rest of this entry »

10,660 views

Yesterday I created an Unattended Installation of a webapplication. Of course it was “just a web link” and the application vendor usually says: you don’t need to install it just go the URL and that’s it.

The reality is usually that you go to the URL and need to install several (ActiveX) components and maybe other dependencies such as Java.

While a user may have the permissions for this on his own pc, on a Citrix or Terminal Server environment this is highly unlikely.

So we need to package and pre-install this for the users.

Nothing special so far but this particular application had some special things that were interesting enough to blog about.

So let’s start with what happened, I visited the URL of an application called Centric Key 2 Financien.

First I got a few popups with Certificates that needed to be accepted:

Cert1

The application’s instructions say that the user must accept this and set the “Always trust content from this publisher” checkbox.

Read the rest of this entry »

861 views

I added some new Categories to the Blog, something I should have done a long time ago.

I also tried to add missing Categories to existing posts but I didn’t check all posts ever written so feel free to add a comment to this post if you miss a category or that a certain post is properly categorized.

The added Categories are:

  • 0 Comments
  • Filed under: General
  • 2,720 views

    Lately I wrote a few articles about fixing bad applications using Compatibility Shims. If you didn’t read them yet, here are the links: 

    I also described that you can install an Application Compatibility Database using the sdbinst command.

    At first I just took a script task in my Altiris Server to deploy the database using sdbinst -q <dbname> but later on I got a better idea.

    Read the rest of this entry »

    2,539 views

    I often hear that people configure the Paging File (on Citrix or Terminal Servers) on a seperate volume but, the reasons is either performance or the chance that the Paging File might corrupt the volume.

    However if at some point you would like to create a Memory Dump you must have a paging file on the boot volume.

    For a Small memory dump you need at least 2MB Paging File on the Boot Volume but for a Full Memory Dump you need a Paging File that is sufficient to hold all the physical RAM plus 1 megabyte (MB).

    Side Note: with the increasing ram of today’s servers, how long does it take for a full memory dump to be saved when you have lots of gigabytes?

    See also: Overview of memory dump file options for Windows Vista, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows XP, and Windows 2000.

    1,988 views

    My collegue that is working with me on the current project was packaging another application that uses Oracle.

    The interesting thing about it is that he ran into the same error I did: the Oracle client tries to create (and access) an Object in the Global namespace.

    But he got an entirely different error message:

    OCIEnvCreate failed with return code -1 but error message text was not available

    To confirm it was the same issue I gave a test user the Create Global Objects privilege and after logging on again the problem went away.

    So I applied the same fix that I wrote about yesterday in Redirect Global Object to Local Objects (aka fix that bad app!) to this application and it worked nicely!

    Blogroll


    Categories


    Archives