/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (4)

Posted by: mekaywe 14 years ago
Brown Belt
0
y dont you try with systemsearch in Wise
Posted by: anonymous_9363 14 years ago
Red Belt
0
Do bear this in mind when reading the registry in 64-bit mode
Posted by: Nomi1985 14 years ago
Senior Yellow Belt
0
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.


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
Blue Belt
0
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ