STATUS
This has been identified as a defect, Change request 113345011 has been raised for this issue to be fixed in a future release of recovery Manager for Exchange.
WORKAROUND
In the meantime one can perform the following changes so that the correct emulation DLL files are loaded without specifying a full path to the files and adding the file paths in the environment variables.
The steps that follow can also be performed out of Powershell (i.e. adding or amending the registry keys in the registry itself via the regedit tool). Here they are shown as done in a PowerShell command prompt:
- Get the registry values
PS C:\> gp 'hklm:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\' | select AppInit_DLLs, LoadAppInit_DLLs, RequireSignedAppInit_DLLs | fl
AppInit_DLLs : ApiEmulation64.dll #correct value
LoadAppInit_DLLs : 1
RequireSignedAppInit_DLLs : 0
PS C:\> gp 'hklm:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows' | select AppInit_DLLs, LoadAppInit_DLLs, RequireSignedAppInit_DLLs | fl
AppInit_DLLs : C:\PROGRA~2\Dell\Recovery Manager for Exchange\ApiEmulation.dll #wrong value
LoadAppInit_DLLs : 1
RequireSignedAppInit_DLLs : 0
- Set the correct value
PS C:\> sp 'hklm:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows' -Name AppInit_DLLs -Value ApiEmulation.dll
PS C:\> gp 'hklm:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows' | select AppInit_DLLs, LoadAppInit_DLLs, RequireSignedAppInit_DLLs | fl
AppInit_DLLs : ApiEmulation.dll
LoadAppInit_DLLs : 1
RequireSignedAppInit_DLLs : 0
# please note that if the path pointing to the ApiEmulation64.dll file is with a path (see result of first PS cmdlet in step 1) then the following PS cmdlet should be run to change this in the registry:
PS C:\> sp 'hklm:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows' -Name AppInit_DLLs -Value ApiEmulation64.dll
- Set RME Install dir to system %PATH%
PS C:\> $RME_INSTALLDIR = (gp 'HKLM:\SOFTWARE\Dell\Recovery Manager for Exchange').InstallDir
PS C:\> $env:path += ';'+$RME_INSTALLDIR
PS C:\> [Environment]::SetEnvironmentVariable("PATH",$env:path,"Machine")
- Start new PowerShell console and type the cmdlet that follows to verify $env:PATH
PS C:\> $env:path -split ';'
C:\Windows\system32
C:\Windows
...
C:\Program Files (x86)\Dell\Recovery Manager for Exchange\
- To verify that ApiEmulation64.dll and ApiEmulation.dll are able to load, specify the powershell.exe process as target in the registry value HKLM:\SOFTWARE\Wow6432Node\Dell\Recovery Manager for Exchange\ApiEmulation\Processes.
PS C:\> test-path 'HKLM:\SOFTWARE\Wow6432Node\Dell\Recovery Manager for Exchange\ApiEmulation'
# if key doesn't exit:
PS C:\> new-item 'HKLM:\SOFTWARE\Wow6432Node\Dell\Recovery Manager for Exchange\ApiEmulation'
- Set the multi string Processes value
PS C:\> sp 'HKLM:\SOFTWARE\Wow6432Node\Dell\Recovery Manager for Exchange\ApiEmulation' -Name Processes -Value ([string[]]'monad.exe', 'tar32.exe', 'powershell.exe')
- Start new PowerShell console and type in the new console:
PS C:\> (get-process -Id $pid).Modules | ? {$_.ModuleName -like 'ApiEmulation*'}
Size(K) ModuleName FileName
------- ---------- --------
556 ApiEmulation64.dll C:\Program Files (x86)\Dell\Recovery Manager for Exchange\ApiEmulation64.dll
- Start new PowerShell (x86) and type in the new console:
PS C:\> (get-process -Id $pid).Modules | ? {$_.ModuleName -like 'ApiEmulation*'}
Size(K) ModuleName FileName
------- ---------- --------
480 ApiEmulation.dll C:\Program Files (x86)\Dell\Recovery Manager for Exchange\ApiEmulation.dll
Steps 7 & 8 prove that the ApiEmulation DLLs are successfully loaded when Powershell is started. therefore starting now emulation in RME should also work.