The Complete How-to Guide

10/07/2018 Stuart Moore

     
              ©     
Cloudhouse Technologies Limited 2017. All Rights Reserved.

Refer to How to save documentation to PDF

Deployment related topics

How to enable Container (AAV) logging

Enabling  full logging on AAV can help identify problems with applications  running in containers, logs will include details of redirections being  applied, 

Step-by-step guide

  1. To enable logging, open file AppAcceleratorV.clc
  2. If required, create the tag in the Configuration below, and set to Full, Error, None depending upon desired level of logging 
    <AAV LogExe="Full" LogDll="Full">
  3. The following logs will be created
    1. Main process redirected by AAV will be logged to AppAcceleratorV-PIDx.cll
    2. Child process(es) redirected by AAV will be logged to AppAcceleratorV-PIDd.cll

Applies To

Cloudhouse Containers


Related articles

How to disable / enable telemetry in a Container

Telemetry  can be enabled / disabled for a Cloudhouse Container during the  packaging process. Administrators can enable, or disable the telemetry  of a Container after it has been created; for example the Container can  be created with telemetry enabled for Proof of Concept, Pilot or UAT  phases of the project, and disabled prior to rolling out the Container  into a Live production environment. To aid with troubleshooting problems  that may be experienced in production, Administrators can edit the  configuration of a Container deployed on a user's desktop, or server and  temporarily enable the telemetry.

Step-by-step guide

  1. Open chmetadata.json file for the Container, located in the Container's root folder.
  2. Set "IsTelemetryEnabled" to desired "true" or "false".

Applies To

Cloudhouse Containers

Related articles

How to manually uninstall, or cleanup a Cloudhouse Container

If  uninstall fails part way through an uninstall, or you want to verify  that all components have been successfully uninstalled follow the steps  below. 

Files

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

Step-by-step guide

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

Applies To

Cloudhouse Containers

Related articles

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

This  article is intended for Administrators who want to deploy  their applications to servers and desktops using AD membership and Group  Policy Objects.

Currently only available for machine deployments i.e. available for all users.

Step-by-step guide

The  following example assumes the Container is called AppContainer, and  it is stored on the UNC share \\share\data\containers and it is to be  deployed to C:\programdata\cloudhouse on the target server, or desktop

  1. Create a batch script containing the following command
    Batch script
    \\unc\path\container-folder\Cloudhouse.Container.Deployment.exe --deploydir C:\Programdata\Cloudhouse
  2. Test the script executes correctly as Administrator
  3. Open the Group Policy Management Console.
    1. Create  a new Group Policy Object (GPO) on the organization unit (OU) in which  your computer accounts reside. You may use an existing Group Policy.
      Steps 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 a Group Policy object (GPO).
      2.  Click New.
      3. In the New GPO dialog box, specify a name for the new GPO, and the click OK.
      4. Open Computer Configuration \ Policies \ Windows Settings\ Scripts (Statup/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 that was created at Step 1,
      8. Or you may click Browse to search for the script file in the Net logon shared folder on the domain controller 
      9. Close the Group Policy Management Console.
    2. Test the GPO, open Command Prompt and run it as Administrator
    3. Run the gpupdate /force command at the command prompt to refresh the group policy.
    4. The application in the container will be installed when the server starts up.

Applies To

Cloudhouse Containers

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 the EventViewer, from here you can  determine what assemblies you need along with the 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 guide

  1. 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 directory as the application executable.

Applies To

Cloudhouse Containers

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, a run action must  be configured in a Run Condition within the programs.xml

  1. Open AppAcceleratorV.clc
  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>

Service APIs Hooked

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

Applies To

Cloudhouse Containers

Related articles

How to resolve problems with out-of-process COM

Applications with components that are 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 guide

  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, place these  files in the same directory as the original executable.
  4. Rename AppAcceleratorV.exe to AAVOriginalExecutable.exe.
    Illustration
  5. Create a configuration file named AAVOriginalExecutable.clc.
  6. In the configuration file (AAVOriginalExecutable.clc), create an EXE tag to refer the virtualization engine to the original executable.
  7. Specify an INCLUDE tag to refer the virtualization 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>

Applies To

Cloudhouse Containers

Related articles

How to debug app compatibility problems using kernel objects (HookKernelObjects)

To  help diagnose problems with application compatibility, the Container  engine provides full logging for the kernel objects detailed in the  Hooked APIs info box below. This information is not available in  ProcMon, and enabling this feature means that additional tools like  APIMon are not required. Enable the HookKernelObjects feature switch in  AppAcceleratorV.clc.

Please note, redirection rules are not applied to these APIs.


Hooked APIs

  • CreateFileMappingA
  • CreateFileMappingW
  • OpenFileMappingA
  • OpenFileMappingW
  • CreateMutexA
  • CreateMutexW
  • CreateMutexExA
  • CreateMutexExW
  • OpenMutexA
  • OpenMutexW
  • CreateEventA
  • CreateEventW
  • CreateEventExA
  • CreateEventExW
  • OpenEventA
  • OpenEventW
  • CreateSemaphoreExA
  • CreateSemaphoreExW
  • OpenSemaphoreA
  • OpenSemaphoreW

Step-by-step guide

  1. To enable kernal logging, open file AppAcceleratorV.clc.
  2.  Modify the <AAV tag to include LogExe and specify "Full".
  3. Uncomment the HookKernalObjects feature.
<AAV LogExe="Full" LogDll="Full">
::
 
<Features>
  <Feature>HookKernelObjects</Feature>
</Features>

Applies To

Cloudhouse Containers


Related articles

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

These instructions should be used when you need the application to behave in one of the following ways:

  • 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 guide

  1. Open the file AppAcceleratorV.clc in a text editor.
  2. Uncomment out the Features tag and the LocalMappedObjectShim within the AAV code block (refer to Code Block).
  3. All other Features must remain within commented out section of the XML.
    <AAV>
    ...
       <Features>
          <Feature>LocalMappedObjectShim</Feature>
       </Features>
    </AAV>
  4. Enabling the feature will convert all Global Objects for files running under AAV to Local Objects.
  5. File  Mapping Exclusions can be applied for named file mapping objects, so  that they remain Global Objects, specify the following additional tags
    <FileMappingExclusions>
      <FileMappingExclusion>Global\somestring</FileMappingExclusion>
    </FileMappingExclusions>

Applies To

Cloudhouse Containers

Related articles

How to suppress UAC prompts (WinVerifyTrust)

If  Windows presents 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 guide

Edit AppAcceleratorV.clc and uncomment the WinVerifyTrust feature.

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

Applies To

Cloudhouse Containers

Related articles

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

Step-by-step guide

  1. Open the file AppAcceleratorV.clc in a text editor.
  2. Comment out the Features tag HandleInvalidHandle.

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

Applies To

Cloudhouse Containers

Related articles

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

Containers  can prevent Windows from using WOW64 redirections and force processes  running in the Container to be 32-bit by hooking IsWow64, PrintDlgExA,  PrintDlgExW, PrintDlgA, PrintDlgW APIs.

Step-by-step guide

  1. Open the file AppAcceleratorV.clc in a text editor.
  2. Comment out the Features tag NotWow64Process.

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

Applies To

Cloudhouse Containers

Related articles

How to redirect networking (HookWinsockAPI)

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

Steps

  1. Open the file AppAcceleratorV.clc in a text editor.
  2. Comment out the Features tag HookWinsockAPIs.
    <AAV>
    ...
       <Features>
          <Feature>HookWinsockAPIs</Feature>
       </Features>
    </AAV>
  3. Configure the required network redirection in the Redirections.xml
    Example Network Redirections
    <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>

Applies To

Cloudhouse Containers

Related articles

If  Citrix Receiver in a Container needs to run with another instance of  Receiver that has been installed natively, then enable the  CitrixRemoteAppRuntimeWithUniqueMutexAndEvent feature switch in  AppAcceleratorV.clc so that AAV can prevent control passing from the instance of Receiver running in the Container to the locally running process.

Step-by-step guide

  1. Open AppAcceleratorV.clc
  2. Uncomment the CitrixRemoteAppRuntimeWithUniqueMutexAndEvent and HookKernelObjects features

<Features>
  <Feature>CitrixRemoteAppRuntimeWithUniqueMutexAndEvent</Feature>
  <Feature>HookKernelObjects</Feature>
</Features>


Applies To

Cloudhouse Containers

Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support