Thursday, October 6, 2011

32-bit vs 64-bit WMI Registry Calls (StdRegProv)

NOTES

  • This article is mainly aimed at VBScript. PowerShell may have the same challenges
  • This article uses registry locations/values for an application and not a Microsoft-supplied registry locations/values. This is because Microsoft appears to have copied all of their registry locations/values to both 32-bit and 64-bit registry locations.
Using the StdRegProv class to manipulate registry information is common among many system administrators. The addition of new architectures, such as 64-bit, introduces the need to evaluate past coding models.
A base connection to the StdRegProv class only connects to the architecture from which its being called. Without specifying the connection architecture, values are read/written based on the architecture calling the StdRegProv.
  • Using the StdRegProv class, without specifying the connection architecture, to make a remote registry call using a 32-bit shell will only have access to 32-bit registry information.
  • Using the StdRegProv class, without specifying the connection architecture, to make a remote registry call using a 64-bit shell will only have access to 64-bit registry information.
  • Using the StdRegProv class with specifying the connection architecture, to make a remote registry call using a 32-bit or 64-bit shell will have access to the architecture specified by the connection.
A WMI registry call using the StdRegProv class without specifying the connection architecture would look like this:
A WMI registry call using the StdRegProv class with specifying the connection architecture would look like this: