The Complete How-to Guide for Cloudhouse Compatibility Containers

Save to PDF

Applies to: Cloudhouse Compatibility Containers

07/08/2019 Cliff Hobbs   ID: 267093

Overview

This document is designed to act as a central guide for How-to-related items for Cloudhouse Compatibility Containers™.

Deployment-related topics

How to enable Container (AAV) logging

Enabling logging on AAV can help identify problems with applications running in Containers. Logs include details of any redirections applied.

See How to enable Container (AAV) logging for details.

Related articles

How to disable/enable telemetry in a Container

Telemetry can be enabled/disabled for a Cloudhouse Container during the packaging process. After creating a Container, Administrators can enable or disable for it. For example, a Container is created with telemetry enabled for the Proof of Concept, Pilot, or UAT phases of the project. Telemetry can then be disabled before the Container is deployed to a live production environment. To aid with troubleshooting problems that may be experienced in production, Administrators can edit the configuration of a Container deployed to a user's desktop/server and temporarily enable telemetry.

Step-by-step process

To enable telemetry:

  1. Open chmetadata.json located in the Container's root folder.
  2. Set IsTelemetryEnabled to either true or false.

Related articles

How to manually uninstall or clean up a Cloudhouse Container

If an uninstall fails part way through or you want to verify all components have been successfully uninstalled, use the following process. 

Note

It is normal for the Cloudhouse.Container.Deployment.exe to report it was unable to delete itself and the DeploymentWorkflowLog.txt file as these are in use. Windows APIs are used to mark the files for deletion.

Step-by-step process

  1. Browse to the deployed location of the Container. For example: C:\ProgramData\ApplicationName
  2. Delete the contents of this folder.
  3. Run Regedit as an Administrator.
    • To remove the Container for the current user, browse to HKEY_CURRENT_USER\Software\Cloudhouse\AppAccelerator and locate the ApplicationName key.
    • To remove the Container from the profiles of all users, you need to remove the ApplicationName key from each user under HKEY_USERS\ $ID\ Software\Cloudhouse\AppAccelerator
  4. Right-click and select to delete the key.
  5. Delete the shortcut icons from the desktop, and Start menu.

Related articles

How to deploy Cloudhouse Containers with an Active Directory Group Policy Object

This process is intended for Administrators who want to deploy their applications to servers and desktops using Active Directory (AD) membership and Group Policy Objects (GPOs).

Note

This capability is currently only available for machine deployments, i.e. available for all users.

Step-by-step process

The following example assumes the Container is:

  • Called AppContainer
  • Stored on the UNC share \\share\data\containers
  • To be deployed to C:\Programdata\Cloudhouse on the target server/desktop.
  1. Create a batch script containing the following command:
    Batch script
    \\share\data\containers\Cloudhouse.Container.Deployment.exe --deploydir C:\Programdata\Cloudhouse
  2. Test the script executes correctly as Administrator.
  3. Open the Group Policy Management Console.
  4. Create a new GPO on the organization unit (OU) in which your computer accounts reside. You can use an existing GPO.
    To create a new GPO:
    1. In the console tree, right-click Group Policy Objects in the forest and domain in which you want to create the GPO.
    2. Click New.
    3. In the New GPO dialog box, specify a name and click OK
    4. Open Computer Configuration | Policies | Windows Settings\Scripts (Startup/Shutdown)
    5. In the details pane, double-click Startup
    6. In the Startup Properties dialog box, click Add
    7. In the Add a Script dialog box, under Script Name type the full network path to the script batch file and the script batch file name created in Step 1 (you can also click Browse to search for the script file in the Netlogon shared folder on the domain controller). 
    8. Close the Group Policy Management Console.
  5. Test the GPO by opening an Administrative Command Prompt.
  6. Run gpupdate /force to refresh the Group Policy.
  7. If everything is working correctly, the application in the Container is installed when the server starts up.

Related articles

Packaging related topics

How to add side-by-side assemblies

The Auto Packager does not configure support for side-by-side assemblies. If your application uses side-by-side assemblies, they must be added to the Container as private assemblies.

The following error message will appear in Event Viewer from which you can determine which assemblies you need, along with their version:

Activation context generation failed for "DemoApplication.exe". Dependent Assembly TowersWatson.Components.Licensing.ComSRM,publicKeyToken="97c62a3c455f5e0d”, type="win32",version="2.0.5.48761" could not be found. Please use sxstrace.exe for detailed diagnosis.

Step-by-step process

  1. Either place the missing DLLs associated with the run-times in the same folder as the executable being run or use Procmon to monitor the application process along with csrss.exe to determine where the application is looking for these DLLs.
  2. Locate the DLLs (located in C:\Windows\Assembly or C:\Windows\WinSXS).
  3. Copy the DLLs (and .MANIFEST if required) into the same folder as the application executable.

Related articles

How to enable application services in a Container (Service)

The Auto Packager does not configure support for services automatically. When packaging an application that includes a service, you must configure a run action in a Run Condition within Programs.xml

Step-by-step process

  1. Open AppAcceleratorV.clc in a text editor.
  2. Add the Service Feature.

    <Features>
      <Feature>Service</Feature>
    </Features>
  3. Open Programs.xml
  4. Add a new program and adjust the arguments to point to the executable.
  5. Set the RunCondition as Always

    <Program ProgramOrder="1">
      <Path>%DefaultDir%\AppAcceleratorV.exe</Path>
      <Args>/f %DefaultDir%\ProgData\Service.exe</Args>
      <WorkingDirectory/>
      <RunCondition>Always</RunCondition>
      <ProcessWindowStyle>Normal</ProcessWindowStyle>
      <WaitCondition>None</WaitCondition>
    </Program>

List of Service APIs Hooked:

  • StartServiceCtrlDispatcherA
  • StartServiceCtrlDispatcherW
  • SetServiceStatus
  • OpenSCManagerA
  • OpenSCManagerW
  • OpenServiceA
  • OpenServiceW
  • CloseServiceHandle
  • StartServiceA
  • StartServiceW
  • QueryServiceConfigA
  • QueryServiceConfigW
  • RegisterServiceCtrlHandlerA
  • RegisterServiceCtrlHandlerW
  • RegisterServiceCtrlHandlerExA
  • RegisterServiceCtrlHandlerExW
  • QueryServiceStatus
  • QueryServiceStatusEx
  • ControlService
  • GetServiceDisplayNameA
  • GetServiceDisplayNameW

Related articles

How to resolve problems with out-of-process COM

Applications with components running out-of-process can cause issues. Procmon can be used to detect these components by monitoring SVCHOST.exe or APIMON filtering by CoCreateInstance, the failure will result in either CLSID not found, or Component not registered.

This is due to the COM subsystem not running within the Container's virtual environment. To resolve this issue, find the CLSID  keys for this component and import them into the local HKCU registry.

Step-by-step process

  1. Identify the CLSID keys and add them into AppRegistry.xml
    <Write>
      <KeyName>HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{5996704-662F-413D-8DCD-E5E221BF2374}\LocalServer32\</KeyName>
      <ValueName/>
      <Value ValueType="String">C:\ProgramData\Cloudhouse\DemoApplications\ProgData\Program Files (x86)\AAVOriginalExecutable.exe</Value>
    </Write>
  2. Change the LocalServer32 value to point to AppAcceleratorV.exe which has been renamed to AAVOriginalExecutable.exe
  3. Create a copy of AppAcceleratorV.exe and AppAccelerator32.dll
  4. Place these files in the same folder as the original executable.
  5. Rename AppAcceleratorV.exe to AAVOriginalExecutable.exe
  6. Create a configuration file named AAVOriginalExecutable.clc
  7. In the AAVOriginalExecutable.clc file, create an EXE tag to refer the virtualisation engine to the original executable.
  8. Specify an INCLUDE tag to refer the virtualisation engine to the main redirection file.
    <AAV>
      <Exe>C:\ProgramData\Cloudhouse\DemoApplication\ProgData\Program Files (x86)\Original.exe</Exe>
      <Includes>
       <Include>%CloudhouseRoot%\DemoApplication\DemoApplicationV.clc</Include>
      </Includes>
    </AAV>

Related articles

How to debug app compatibility problems using kernel objects 

Prior to version 4.5.249.22579 of AppAcceleratorV, to debug app compatibility problems using kernel objects required the HookKernelObjects compatibility Feature to be enabled.

Later versions of AppAcceleratorV provide all the required hooks by default.

Note

See DEPRECATED: How to debug app compatibility problems using kernel objects (HookKernelObjects) for more information on the HookKernelObjects Feature, should you need to use it.

How to convert a process from global to a local process (LocalMappedObjectShim)

Use these instructions when you need the application to behave in one of the following ways:

  • To enable an application that requires Administrator privileges to run under a lower privilege account.
  • To enable multiple instances of the desktop application to run on a server operating system when the application's use of global objects is preventing the application from installing.

Step-by-step process

  1. Open the AppAcceleratorV.clc in a text editor.
  2. Uncomment the <Features> tag and the LocalMappedObjectShim within the <AAV> code block (all other Features must remain in the commented out section of the XML).
    <AAV>
    ...
       <Features>
          <Feature>LocalMappedObjectShim</Feature>
       </Features>
    </AAV>

Note

Enabling this feature will convert all Global Objects for files running AAV to Local Objects.

File Mapping Exclusions can be applied for named file mapping objects so that they remain Global Objects. To do this, specify the <FileMappingExclusion> tags:

<FileMappingExclusions>
  <FileMappingExclusion>Global\somestring</FileMappingExclusion>
</FileMappingExclusions>

Related articles

How to suppress UAC prompts (WinVerifyTrust)

If Windows presents User Access Control (UAC) prompts for an application that can be started and used without admin rights, then the UAC can be suppressed for only this application.

Step-by-step process

Open the AppAcceleratorV.clc in a text editor and uncomment the WinVerifyTrust feature.

<Features>
 <Feature>WinVerifyTrust</Feature>
</Features>

Related articles

How to ignore invalid handles

When invalid handles cause applications to fail to run, AAV can be configured to ignore the invalid handle.

Step-by-step guide

  1. Open AppAcceleratorV.clc in a text editor.
  2. Comment out the HandleInvalidHandle Feature.

    <AAV>
    ...
       <Features>
          <Feature>HandleInvalidHandle</Feature>
       </Features>
    </AAV>

Related articles

How to prevent WOW64 redirections and force a process to be a 32-bit (NotWow64Process)

Containers can prevent Windows from using WOW64 redirections and force processes running in the Container to be 32-bit by hooking the following API:

  • IsWow64
  • PrintDlgExA
  • PrintDlgExW
  • PrintDlgA
  • PrintDlgW APIs.

Step-by-step process

  1. Open the AppAcceleratorV.clc in a text editor.
  2. Comment out the NotWow64Process Feature.

    <AAV>
    ...
       <Features>
          <Feature>NotWow64Process</Feature>
       </Features>
    </AAV>

Related articles

How to redirect networking (HookWinsockAPI)

Containers can provide redirection for Window's Winsock APIs so that the ports and IP addresses used by an application are redirected without changing the application's source code.

Step-by-step process

  1. Open the AppAcceleratorV.clc in a text editor.
  2. Comment out the HookWinsockAPIs Feature.
    <AAV>
    ...
       <Features>
          <Feature>HookWinsockAPIs</Feature>
       </Features>
    </AAV>
  3. Configure the required network redirection in the Redirections.xml
    Example:
    <AAV>
    ::
      <Network>
        <Connect>
          <From>
            <IP>192.168.2.1</IP>
            <Port>13000</Port>
          </From>
          <To>
            <IP>127.0.0.1</IP>
            <Port>12000</Port>
          </To>
       </Connect>
    </Network>

Related articles

Source:
Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support