The agent on the SMA ( Systems Management Appliance ) is 32 bit to facilitate installing on both 32 and 64 machines while only employing one agent. This makes deploying agents manageable in a mixed environment; however, this can cause some issues writing scripts, batch files or custom inventory rules.
When requesting that the agent edit the registry on a 64 bit machine, it may not update the path expected. This is true of most of the paths in HKLM\software. It will update the similar path for 32 bit apps in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. This is because a 32 bit application (the agent) is redirected to write in the 32 bit registry by default.
By using simple redirects, we can get the agent to write to the correct key. An example would be instead of hklm\software\xxx, use hklm64\software\xxx.
In a script, when using a Verify or Set of a key, give the 64 bit path.
Key for key in script -
HKEY_LOCAL_MACHINE64\SOFTWARE\7-Zip
Using reg (add or other switch), put the reg:64 at the end. This is also true of batch files.
Online shell script -
reg add HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip /v path /d c:\test\shtest /f /reg:64
If running a Custom Inventory Rule, again, after HKLM -
Custom Inventory Rule -
RegistryValueReturn(HKEY_LOCAL_MACHINE64\SOFTWARE\7-Zip, name, type)
The command line called in a script, usually in a batch file, is also 32 bit and located in C:\Windows\SysWOW64 and is not identical to cmd.exe that is in C:\Windows\System32. Although they often can be used interchangeably, there are areas where the 32 cmd cannot access.
For example, the 32 cmd cannot access C:\Windows\System32\GroupPolicy\User. It is necessary to call the 64 bit cmd to access this area.
64 bit cmd (command line)
%windir%\Sysnative\cmd.exe
It is necessary to verify the exact location within the registry of the actual key, as some may be located in unexpected places, depending on how the application wrote them. Once the exact location is confirmed, the above steps should assist with updating the locations via the K1000 agent.
Reference -
http://support.microsoft.com/kb/948698
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx
For more information, please see: How To Use Windows 64bit 32bit Redirects
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center