One option is to check for Registry Key "HKLM\SOFTWARE\Wow6432Node\SAP". If found, then you have a 64 bit system, 32 bit otherwise.
Below is a piece of code I use at the very beginning of my "On Installation End" script.
'
'---- Handling 32bit and 64bit Registry Differences
'
If NwEngine.Shell.RegKeyExist("HKLM\SOFTWARE\Wow6432Node\SAP") Then
strSAPRegPath = "HKLM\SOFTWARE\Wow6432Node\SAP"
else
strSAPRegPath = "HKLM\SOFTWARE\SAP"
End If
Then I can just reference the variable "strSAPRegPath" throught the script. For example:
'
'---- Branding
'
strUseBrandingRegPath = strSAPRegPath & "\General\Appearance\UseBrandingImage"
strBrandingImageRegPath = strSAPRegPath & "\General\Appearance\BrandingImage"
Regards,
Daniel Leal