I want to write a script that finds if my Windows is 64 bit or 32 bit (or another taste) to decide which installation package should be used.

Has anybody a better suggestion then trying to find an environment variable like ProgramFiles(x86) or CommonProgramFilesx(86)?

 Code:
Break On

;Declare variables
Dim $CommonProgramFiles
Dim $CommonProgramFilesx86
Dim $ProgramFiles
Dim $ProgramFilesx86

;Code
$ProgramFilesx86 = '%ProgramFiles(x86)%'
If Not $ProgramFilesx86 = ''
	? '64 bit OS'
Else
	? 'Not 64 bit OS'
	$ProgramFiles = '%ProgramFiles%'
	If Not $ProgramFiles = ''
		? '32 bit OS'
	EndIf
EndIf

$CommonProgramFilesx86 = '%CommonProgramFilesx(86)%'
If Not $CommonProgramFilesx86 = ''
	? '64 bit OS'
Else
	? 'Not 64 bit OS'
	$CommonProgramFiles  = '%CommonProgramFiles%'
	If Not $CommonProgramFiles  = ''
		? '32 bit OS'
	EndIf
EndIf