Determining difference from Vista32 and Vista64

Discussion in 'Perl Misc' started by mpetersrx7, Apr 26, 2007.

  1. mpetersrx7

    mpetersrx7 Guest

    Is ther any way to determine in the running code the type of OS and
    distinguish from 32-bit vs 64-bit Vista or XP. I know the
    Win32::GetOSVersion call but both the 32-bit and 64-bit of Vista
    return the same thing for $major, $minor and $id.

    Thanks,
    Mark
     
    mpetersrx7, Apr 26, 2007
    #1
    1. Advertisements

  2. mpetersrx7

    Sisyphus Guest

    ----- Original Message -----
    From: <>
    Newsgroups: comp.lang.perl.misc
    Sent: Friday, April 27, 2007 2:56 AM
    Subject: Determining difference from Vista32 and Vista64

    Ok - so you've worked out how to determine whether it's Vista or not.
    (Actually, I'd probably use Win32::GetOSName instead.)

    If it's a 64 bit operating system (both XP and Vista, I think) there'll be a
    C:\Windows\SysWOW64\ folder - otherwise that folder won't exist.

    Actually, faik, there may be a way of installing Windows in such a way that
    the system files don't go into the C drive at all .... which would
    complicate matters a little.

    Anyway, on my Vista64 box:

    C:\_32>perl -MWin32 -e "print Win32::GetOSName"
    WinVista
    C:\_32>perl -e "print -e 'C:/Windows/SysWOW64/cmd.exe'"
    1

    And that's the same irrespective of whether it's run in the
    C:\Windows\System32\cmd.exe shell or the C:/Windows/SysWOW64/cmd.exe shell
    .... and irrespective of whether I run ActiveState's 32-bit build of perl or
    their 64-bit build.

    Cheers,
    Rob
     
    Sisyphus, Apr 27, 2007
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.