> Not very strong reasons, but there are some 
> * With a 64bit version I can get rid of all the path magic I have to do for 
> deployment
> (to differenciate between %PROGRAMFILES% and %PROGRAMFILES(x86)%) Shorter 
> scripts mean less errors. 

A bit offtopic, but still important:

With deployments, never assume you know the architecture or environment your 
script runs in. Never. It will get back to you one day. ;-)

Here's a small VBScript function which will always return the true Windows 
architecture (32 or 64) no matter where you run it.

----------
' Returns true Windows OS architecture
' Returns: 0: OS architecture not found (or Intel Itanium)
'          32: 32-bit OS (x86)
'          64: 64-bit OS (AMD64)

Function GetOSArchitecture
  Dim objProcEnv
  Set objProcEnv = objShell.Environment("Process")
 
  Select Case objProcEnv("PROCESSOR_ARCHITECTURE")
    Case "x86"
      Select Case objProcEnv("PROCESSOR_ARCHITEW6432")
         Case ""
           GetOSArchitecture = 32
         Case "AMD64"
           GetOSArchitecture = 64
         Case Else 
           GetOSArchitecture = 0
      End Select
    Case "AMD64"
      GetOSArchitecture = 64
    Case Else
      GetOSArchitecture = 0
  End Select
 
End Function
----------

Best regards,

-- 
Mikko Järvinen
Systems Architect
IT Services | University of Turku | Finland
mobile: +358400539424
Microsoft MVP - Cloud and Datacenter Management


_______________________________________________
Enterprise mailing list
[email protected]
https://mail.mozilla.org/listinfo/enterprise

To unsubscribe from this list, please visit 
https://mail.mozilla.org/listinfo/enterprise or send an email to 
[email protected] with a subject of "unsubscribe"

Reply via email to