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:
Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
Dim StdRegProv: Set StdRegProv = GetObject("winmgmts:{impersonationlevel=impersonate}!//./root/default:StdRegProv")
Dim InstallDir: StdRegProv.GetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "InstallDir", InstallDir
WScript.Echo InstallDir
A WMI registry call using the StdRegProv class with specifying the connection architecture would look like this:
Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
WScript.Echo GetDWordValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "UserInfoInterval", 32)
WScript.Echo GetDWordValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "UserInfoInterval", 64)
Function GetDWordValue (ByVal Resource, ByVal hDefKey, ByVal SubKeyName, ByVal ValueName, ByVal Architecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", Architecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("GetDWORDValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = SubKeyName
oInParams.sValueName = ValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("GetDWORDValue", oInParams, , oCtx)
GetDWordValue = oOutParams.uValue
End Function
Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
WScript.Echo GetStringValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "InstallDir", 32)
WScript.Echo GetStringValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "InstallDir", 64)
Function GetStringValue (ByVal Resource, ByVal hDefKey, ByVal SubKeyName, ByVal ValueName, ByVal Architecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", Architecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("GetStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = SubKeyName
oInParams.sValueName = ValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("GetStringValue", oInParams, , oCtx)
GetStringValue = oOutParams.sValue
End Function
Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
WScript.Echo SetStringValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "InstallDir", 0, 32)
WScript.Echo SetStringValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "InstallDir", 0, 64)
Function SetDWordValue (ByVal Resource, ByVal hDefKey, ByVal SubKeyName, ByVal ValueName, ByVal Value, ByVal Architecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", Architecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("SetDWordValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = SubKeyName
oInParams.sValueName = ValueName
oInParams.uValue = Value
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("SetDWordValue", oInParams, , oCtx)
SetDWordValue = oOutParams.ReturnValue
End Function
Function KeyExists(ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("EnumKey").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("EnumKey", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then
KeyExists = 1
Else
KeyExists = 0
End If
End Function
Function KeyEmpty(ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim subitemCount: subitemCount = 0
Dim sValueName: sValueName = ""
Dim oInParams, oOutParams
' EnumKey (no subkeys)
Set oInParams = oReg.Methods_("EnumKey").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Set oOutParams = oReg.ExecMethod_("EnumKey", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then
If Not IsNull(oOutParams.sNames) Then
subitemCount = subitemCount + UBound(oOutParams.sNames) + 1
End If
End If
' EnumValues (no values)
Set oInParams = oReg.Methods_("EnumValues").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Set oOutParams = oReg.ExecMethod_("EnumValues", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then
If Not IsNull(oOutParams.sNames) Then
subitemCount = subitemCount + UBound(oOutParams.sNames) + 1
End If
End If
' GetStringValue (no default value)
Set oInParams = oReg.Methods_("GetStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
Set oOutParams = oReg.ExecMethod_("GetStringValue", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then
If Not IsNull(oOutParams.sValue) Then
subitemCount = subitemCount + 1
End If
End If
if subitemCount = 0 Then
KeyEmpty = 1
Else
KeyEmpty = 0
End If
End Function
Function GetDWordValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("GetDWORDValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("GetDWORDValue", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then GetDWordValue = oOutParams.uValue
End Function
Function GetStringValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("GetStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("GetStringValue", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then GetStringValue = oOutParams.sValue
End Function
Function SetDWordValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal uValue, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("SetDWordValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
oInParams.uValue = uValue
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("SetDWordValue", oInParams, , oCtx)
SetDWordValue = oOutParams.ReturnValue
End Function
Function SetStringValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal sValue, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("SetStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
oInParams.sValue = sValue
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("SetStringValue", oInParams, , oCtx)
SetStringValue = oOutParams.ReturnValue
End Function
Function SetMultiStringValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal sValue, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("SetMultiStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
oInParams.sValue = sValue
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("SetMultiStringValue", oInParams, , oCtx)
SetMultiStringValue = oOutParams.ReturnValue
End Function
Function CreateKey (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("CreateKey").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("CreateKey", oInParams, , oCtx)
CreateKey = oOutParams.ReturnValue
End Function
Function DeleteValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("DeleteValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("DeleteValue", oInParams, , oCtx)
DeleteValue = oOutParams.ReturnValue
End Function
Function DeleteKey (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("DeleteKey").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("DeleteKey", oInParams, , oCtx)
DeleteKey = oOutParams.ReturnValue
End Function
Function EnumValues (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("EnumValues").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("EnumValues", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then Set EnumValues = oOutParams
End Function
Function EnumKey (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("EnumKey").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("EnumKey", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then Set EnumValues = oOutParams
End Function
Function GetMultiStringValue (ByVal Resource, ByVal hDefKey, ByVal sSubKeyName, ByVal sValueName, ByVal ProviderArchitecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", ProviderArchitecture
oCtx.Add "__RequiredArchitecture", True
Dim oLocator: Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
oLocator.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
oLocator.Security_.AuthenticationLevel = wbemAuthenticationLevelPktPrivacy
Dim oReg: Set oReg = oLocator.ConnectServer(Resource, "root\default", "", "", , , , oCtx).Get("StdRegProv")
Dim oInParams: Set oInParams = oReg.Methods_("GetMultiStringValue").InParameters
oInParams.hDefKey = hDefKey
oInParams.sSubKeyName = sSubKeyName
oInParams.sValueName = sValueName
Dim oOutParams: Set oOutParams = oReg.ExecMethod_("GetMultiStringValue", oInParams, , oCtx)
If oOutParams.ReturnValue = 0 Then GetMultiStringValue = oOutParams.sValue
End Function
view raw functions.vbs hosted with ❤ by GitHub

Saturday, August 20, 2011

Secure Information Storage

My suggestion for centralized password management can stores passwords, credit card information, secure notes, etc.

LastPass

Tuesday, August 16, 2011

Why are 32-bit shortcuts needed on 64-bit systems?

A 64-bit system normally contains shortcuts to 64-bit versions of operating system applications, such as cmd.exe, odbcad32.exe, wscript.exe, cscript.exe, etc. Creating shortcuts to 32-bit versions of these same applications may be necessary in order to access objects, such as 32-bit ODBC drivers.

As an example, running the 64-bit version of odbcad32.exe (located in system32) will show 64-bit version ODBC drivers, but not 32-bit. Running the 32-bit version of odbcad32.exe (located in syswow64) will show 32-bit version ODBC drivers, but not 64-bit.

Running a script, such as VBScript that utilizes 32-bit ODBC drivers, from a 64-bit version of cmd.exe (located in system32) may fail because of it inability to access 32-bit ODBC drivers. The same script will run successfully using the 32-bit version of cmd.exe.

Threat Protection

My suggestion for non-managed threat protection that is feature rich and has a free version for home use.

Comodo Internet Security