Determining difference from Vista32 and Vista64

M

mpetersrx7

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
 
S

Sisyphus

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

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.

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top