vbs to test win version

Discussion in 'Windows 64bit' started by Alain Bourgeois, Dec 1, 2009.

  1. Hi all,

    I have install scripts in that modify the sandbox mode of access 2007
    (registry key).
    However, the key to change is not the same in a windows 32bits and a
    windows 64bits.
    ( HKLM\Software\Microsoft\Office\12.0\Access Connectivity
    Engine\Engines] in win32 ->
    HKLM\Software\Wow\Microsoft\Office\12.0\Access Connectivity
    Engine\Engines] in win64 ).

    So my question: using vbs, how can I check if I am running win 32 or win
    64?
    ver command line gives the same for both windows.

    Thank you,
    Alain
     
    Alain Bourgeois, Dec 1, 2009
    #1
    1. Advertising

  2. Charlie Russel - MVP wrote:
    > In PowerShell: $ENV:processor_Architecture -eq "AMD64".
    > In CMD: "%Processor_Architecture%" == "AMD64"
    >
    > In vbs? I have no idea. Don't use VBS. But given that it's right there
    > in the environment, I suspect you can get at it easily enough. ;)


    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set WshSysEnv = WshShell.Environment("SYSTEM")
    WScript.Echo WshSysEnv("PROCESSOR_ARCHITECTURE")

    --
    Crash

    "Update" and "upgrade" are not synonyms.
     
    Dave \Crash\ Dummy, Dec 2, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    14,081
    garethb
    Dec 11, 2005
  2. Guest

    test test test test test test test

    Guest, Jul 2, 2003, in forum: Computer Support
    Replies:
    2
    Views:
    1,053
    halfalifer
    Jul 2, 2003
  3. John H. Guillory

    VBS.Illen maybe

    John H. Guillory, Dec 3, 2003, in forum: Computer Support
    Replies:
    1
    Views:
    765
    °Mike°
    Dec 3, 2003
  4. dleve50
    Replies:
    0
    Views:
    505
    dleve50
    Apr 29, 2005
  5. Charlie Russel - MVP

    Re: vbs to test win version

    Charlie Russel - MVP, Dec 1, 2009, in forum: Windows 64bit
    Replies:
    0
    Views:
    429
    Charlie Russel - MVP
    Dec 1, 2009
Loading...

Share This Page