which method of scripting is adviced for determinig OS architechture..??
I'm very new to scripting, I have two scripts for determinig architechture
one is using the function :
function Determine64BitMode
dim Shell, Is64BitOs
set Shell = CreateObject("WScript.Shell")
on error resume next
Shell.RegRead "HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir (x86)"
Is64BitOs = Err.Number = 0
on error goto 0
if Is64BitOs then
Determine64BitMode = InStr(Shell.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir"), "(x86)") = 0
else
Determine64BitMode = false
end if
end function
and the other is :
Shell.ExpandEnvironmentStrings( "%PROCESSOR_ARCHITECTURE%" )
But few people adviced me not to use the later one,
Can anyone spare some time in showing me lights on this..