Archive

Archive for January 1, 2011

App-V: OSD Workaround for Using App-V with AppSense Environment Manager

January 1, 2011 3 comments

When you use products such as AppSense Environment Manager or Process Explorer to monitor applications, Virtual applications will report/show always as version “0.0.0” or no version information at all.

This will happen in most recent versions of App-V and Softgrid. The issue is not just tied to AppSense, or Process Explorer, but would affect an application trying to parse the PE header of the application executable, or profile the process based on the path being specified by drive letter.
Programs such as AppSense should likely have a master hook DLL located here:

HKLM\Software\Microsoft\Windows NT\Current Version\Windows

Value: AppInitDLL

With AppSense it is usually “C:\\PROGRA~1\\AppSense\\ENVIRO~1\\Agent\\PVCLOA~1.DLL” or something similar. This hook will try to attach to the executable launching and parse its PE header to get version information. When you use the configuration the OSD FILENAME uses for the executable:

<SFTMOUNT>\Directory\EXEFile.exe

i.e. office.001\Microsoft Office\winword.exe

It actually gets launched as

%SFTMNT%\<SFTMOUNT>\Directory\EXEFile.exe

or Q:\office.001\Microsoft Office\winword.exe

This path configuration will lead to any monitoring program getting “Access Denied” and/or showing erroneous information because that drive letter is only available via a local mount from within the virtual environment.

A Named Pipe mount path in the OSD file is a workaround for read-only access to the file system from outside the virtual environment. This allows the hook DLL to route to the executable in the virtual mount via a loopback named pipe.

\\127.0.0.1\n$\<SFTMOUNT>\directory\EXEfile.exe

or

\\%COMPUTERNAME%\n$\<SFTMOUNT>\directory\EXEfile.exe

where:

n – is the drive letter used by Softgrid/App-V

<SFTMOUNT> is the mount directory used when sequencing the application.

If you notice once the FILENAME path is modified, the virtual application will show up differently.

For example, if the FILENAME path in the OSD states:

FILENAME=”SFT_MNT\<AppRoot.001>\directory\app.exe”

replace it with:

FILENAME=”\\127.0.0.1\n$\<AppRoot.001\directory\app.exe

or

FILENAME=”\\%COMPUTERNAME%\n$\<AppRoot.001\directory\app.exe

where:

n – is the drive letter used by Softgrid/App-V

<SFTMOUNT> is the mount directory used when sequencing the application.

** – please use the actual variable for %COMPUTERNAME% and not the computer name itself.

Special NOTE for VFS Paths:

If the executable is in a VFS path, the modification is slightly different:

FILENAME=”%CSIDL_PROGRAM_FILES%\Directory\app.exe”

with

FILENAME=”\\%COMPUTERNAME%\n$\<SFTMOUNT>\VFS\%CSIDL_PROGRAM_FILES%\Directory\App.exe”

or

FILENAME=”\\127.0.0.1\n$\<SFTMOUNT>\VFS\%CSIDL_PROGRAM_FILES%\Directory\App.exe”

where:

n – is the drive letter used by Softgrid/App-V

<SFTMOUNT> is the mount directory used when sequencing the application.

VFS is a constant.

** – please use the actual variable for %COMPUTERNAME% and not the computer name itself.

If you notice once the FILENAME path is modified, the virtual application will show up differently.

Also Process Explorer will not show the following without this workaround or running it inside the virtual environment from a command prompt:

  • Process Version
  • Process Image Date/Time stamp
  • Strings