Custom Actions fail when set to Run As a specific Domain User

Version 1

    Verified Product Versions

    Environment Manager 8.6Environment Manager 8.5Environment Manager 8.4Environment Manager 8.2Environment Manager 8.1Environment Manager 8.3Environment Manager 8.0


    You have a custom action (vbScript / Powershell / Jscript) which is set to Run As a specific domain user, typically an administrator account. The script completes as expected when running manually through an elevated command prompt, but fails when running via Environment Manager.



    User Account Control (UAC) is enabled.


    The following errors have been observed when this issue is present:

    cscript.exe / wscript.exe fail to launch with:


    "CScript Error: Can't find script engine "VBScript" for script"


    Powershell scripts may fail with:


    HRESULT : 0x80070005 (E_ACCESSDENIED) or a CommandNotFoundException


    If you attempt to echo $root to the screen the following message is thrown:


    format-default : The following exception occurred while retrieving member "PSComputerName": "Unknown error (0x80005000)"

    + CategoryInfo : NotSpecified: (:) [format-default], ExtendedType SystemException

    + FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Commands.FormatDefaultCommand



    Querying wmi may fail with:


    + CategoryInfo : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException

    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

    This can be caused by a change made to the following registry value:

    Registry Key:   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3
    Value Name:     REGDBVersion

    This value is typically set to 010000 , but may vary.

    Various products have been known to modify this setting, including (but not limited to):

    •  Microsoft .NET Framework 1.1
    • VMWare Tools
    • Citrix XenApp

    Set the above registry value back to 01 00 00 00