Select to view content in your preferred language

C# or VB Help Plz:)? 32 & 64 .reg file deployment for managed .ncfg

875
2
07-21-2011 11:59 AM
DavidZiff
Deactivated User
Following: http://webhelp.esri.com/arcgisexplorer/1700/en/appconfig_set.htm

I have created registry files (32 & 64 bit) for the deployment of ArcGIS Explorer in a controlled configuration environment. 

The issue is - i would like to build and application which queries the operating system at install and  determines which .reg file (32 or 64) is to be installed and then for the appropriate one to be used.

I realize this may sound easier in theory than in practice and Vista, XP and the like have their nuances but if its out there and someone has time to cut and paste - it will be greatly appreciated.

Thanks in advance, dz
0 Kudos
2 Replies
BrianLeroux
Frequent Contributor
If you want to use VB script you can start with this.
'32 or 64 bit


Set WshShell = WScript.CreateObject("WScript.Shell")
const HKEY_LOCAL_MACHINE = &H80000002 
strComputer = "." 

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" 
strValueName = "PROCESSOR_ARCHITECTURE"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Call MsgBox("Current Processor Archiecture: " & strValue, vbOKOnly + vbInformation, "Installed OS")

Select Case strValue
Case "x86"
 strKeyPath = "SOFTWARE\ESRI\Explorer1700\Settings"
 strValueName = "Change for correct value"
 dwValue = change to what you want
 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
Case "x64"
 strKeyPath = "SOFTWARE\Wow6432Node\ESRI\Explorer1700\Settings "
 strValueName = "Change for correct value"
 dwValue = change to what you want
 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
End Select
0 Kudos
DavidZiff
Deactivated User
ty - will give it a go. 

Apparently there is no rush, found out we are all 32 bit atm; even the GIS and design work stations specked for more than 3.5 GB RAM -  don't ask - doesn't make any sense - objectively speaking of course.  Red tape and non GIS external specifying know nots....
0 Kudos