Reading a registry value in Windows7, 64Bit Machine Using Wise
Hi Guys,
I want to read the value at the location "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation"
Through Wise7 or Wise8 on a windows7, 64bit machine.Please provide me a suitable solution to go ahead with this.
The approaches used to read this: Using wise script it failed
A vbscript was called in wise to read the above registry value.
But still I was not able to achieve, Any suggestions will be helpful
I want to read the value at the location "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation"
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Do bear this in mind when reading the registry in 64-bit mode
Posted by:
Nomi1985
14 years ago
Use these custom actions to access the 64-bit registry; will save you a lot of time: http://www.symantec.com/connect/downloads/wise-installation-builder-7-64-bit-registry-script-actions
Here is some plugin code you can use in your VBScripts to selectively search the 32 or 64-bit registry nodes.
Here is some plugin code you can use in your VBScripts to selectively search the 32 or 64-bit registry nodes.
Dim objWMI, objReg
Dim objCtx, objLocator, objServices, archCOL, archOBJ, strOS64, strRegSearchType
Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
Set archCOL = objWMI.ExecQuery("SELECT * FROM Win32_Processor",,48)
Sub DetermineOSArch ()
For Each archOBJ in archCOL
'-> X86, To determine if we are on a 32-bit OS
If InStr(LCase(archOBJ.Caption),LCase("x86")) Then
strOS64 = "0"
Exit For
End If
'-> X64, To determine if were are on a 64-bit OS
If InStr(LCase(OBJ.Caption),LCase("x64")) Then
strOS64 = "1"
Exit For
End If
Next
End Sub
Sub Search64Or32 (strOS64, strRegSearchType)
'If we are on a 64-bit OS...
If strOS64 = "1" Then
If strRegSearchType = "A" Then 'If instructed to search the 64-bit registry...
objCtx.Add "__ProviderArchitecture", 64
ElseIf strRegSearchType = "B" Then 'If instructed to search the 32-bit registry...
objCtx.Add "__ProviderArchitecture", 32
End If
Set objLocator = CreateObject("Wbemscripting.SWbemLocator")
Set objServices = objLocator.ConnectServer("","root\default","","",,,,objCtx)
Set objReg = objServices.Get("StdRegProv")
'Else if we are on a 32-bit OS...
Else
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
End If
End Sub
Posted by:
shweta_kar
14 years ago
Hi,
In Installshield Adminstudio there is option to search 64 bit registry , when you add a system search for a registry where we just check the box which says 'Search the 64 bit portion of the registry'
In WPS, while adding the system search , using properties in condition can also be used to customise your installation.
Have you tried it.
In Installshield Adminstudio there is option to search 64 bit registry , when you add a system search for a registry where we just check the box which says 'Search the 64 bit portion of the registry'
In WPS, while adding the system search , using properties in condition can also be used to customise your installation.
Have you tried it.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.