I am using a custom application. From this application, after generating a report, I have the option to export the report to either Word or Excel. I have Office 2003 installed to the base and this is what the users normally use, but the custom application’s reports are generated by Access 97 and when opened in Word or Excel 2003, the user receives conversion errors.
It was recommended to install the Office 97 components needed for the custom application into the same layer and then lower the HKCR priority of the layer so only the custom application would use the Office 97 components and the end users would use Office 2003. However, reports exported to Word and Excel are still being opened with Office 2003.
When the custom application is exporting the report data to Word or Excel, it first creates the appropriate file (.RTF for Word and .XLS for Excel) and then executes a shell open command to launch the associated application.
The keys for the open commands for .RTF and .XLS are
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8\shell\Open\command respectively. The application to launch is usually the data defined in the (Default) value under these keys. The Office 97 components use this value to designate the program to launch for these extensions.
Starting with Microsoft Office 2000, which uses the .MSI service to install its components, there is a second value added with the name command and data which is seemingly incomprehensible. The data in this value is used by the MSI service to identify what program should be run when this shell command is run. If the data in (Default) does not match, the msi service runs a repair and changes the data in (Default).
Since the Office 97 components do not include this key, when the program was being launched from the layer, Windows was seeing the data for (Default) from the layer and also the data for command from the base and the MSI repair was changing the data of (Default) in the layer's writable sublayer and then Windows launched the 2003 version of the application.
The solution is to hide the command value from Windows so the MSI service does not “fix” the (Default) value. This was accomplished through the use of registry delete entries.
In the Layer Editor got to the Registry tab. In the Read-only section browse to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8\shell\Open\command. Right-click in the right-hand panel and select New > DWORD Value. Name the value ~FSL~command. Change the value data to 1.
In the Read-only section, browse to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.RTF.8\shell\Open\command. Right-click in the right-hand panel and select New > DWORD Value. Name the value ~FSL~command. Change the value data to 1.
Since you wanted the Office 97 components to only be used for this program and Microsoft Office 2003 (installed in the base) to be used in all other cases the HKCR priority for this layer needed to be lowered below the base HKCR priority. This can be done with the following command line:
SVSCMD.exe <layer name> PRIORITY -T HKCR -L 95.5
Applies To Software Virtualization Solution Office 2003 in the base Custom application and Office 97 components in a virutal layer
Imported Document ID: TECH12926
Subscribing will provide email updates when this Article is updated. Login is required.