Kaseya Community

How to determine 32 or 64 bit in win7...

  • Using the registry? Any ideas?

    Thanks.

    Legacy Forum Name: How to determine 32 or 64 bit in win7...,
    Legacy Posted By Username: BryanWithPCCare
  • 32bit doesn't have this or any keys contained within it that I have seen:


    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node


    Legacy Forum Name: How-To,
    Legacy Posted By Username: CeruleanBlue
  • Thank You!

    Legacy Forum Name: How-To,
    Legacy Posted By Username: BryanWithPCCare
  • If that doesn't work, you can find it by using the command:

    wmic os get OSArchitecture

    Legacy Forum Name: How-To,
    Legacy Posted By Username: k2tech_tony
  • CeruleanBlue
    32bit doesn't have this or any keys contained within it that I have seen:


    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node


    I have seen this key configured on some 32 bit systems Eek

    I'm not sure whether that's a result of me writing a script which accidentally writes this key, or some other application developer doing the same. Confused

    But as far as I can tell, 32 bit Windows won't stop you creating this in the registry.

    Andrew

    Legacy Forum Name: How-To,
    Legacy Posted By Username: andrew.doull@computer-care.com.au
  • [QUOTE=andrew.doull@computer-care.com.au;52730]I have seen this key configured on some 32 bit systems Eek

    I'm not sure whether that's a result of me writing a script which accidentally writes this key, or some other application developer doing the same. Confused

    But as far as I can tell, 32 bit Windows won't stop you creating this in the registry.

    Andrew[/QUOTE]

    Try checking for both the registry key and the "Program Files (86)" directory.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty
  • in scripting we use the following check for detection of 64bit os


    IF Test File
    Parameter 1 : %CommonProgramFiles(x86)%\NUL
    Exists :


    Legacy Forum Name: How-To,
    Legacy Posted By Username: Martijn Frickel
  • [QUOTE=k2tech_tony;52629]If that doesn't work, you can find it by using the command:

    wmic os get OSArchitecture[/QUOTE]

    Now you've done it. Another command I've never heard of that I want to look into more... Smile

    This call is probably the best method, since the registry keys and folders CAN be accidentally created. I've also seen some bizarre things happen from low-budget installers creating the keys and folders, probably as a hack for 64-bit compatibility.

    Here's how you could script it:

    Script 1:

    Script Name: Install Application (Step 1)
    Script Description:

    IF True
    THEN
    Execute Shell Command
    Parameter 1 : wmic os get OSArchitecture >> #vAgentConfiguration.AgentTempDir#/OS-Width.txt
    Parameter 2 : 0
    OS Type : 0
    Execute Script
    Parameter 1 : Install Application (Step 2)
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 0
    ELSE



    Script 2:


    Script Name: Install Application (step 2)
    Script Description:

    IF Test File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\OS-Width.txt
    Not Contains :"64-bit"
    THEN

    ELSE


    Adjust to your liking.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: dwujcik
  • I've also seen the Wow6432Node key on a 32-bit system.

    But I've found this registry key works great:

    HKEY_Local_Machine\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE

    Returns:

    x86 = 32-bit
    AMD64 = 64-bit

    I've tested it with Windows 7, Vista, Server 2008, and Server 2003

    Matt

    Legacy Forum Name: How-To,
    Legacy Posted By Username: connectex
  • #vMachine.OsInfo#

    Legacy Forum Name: How-To,
    Legacy Posted By Username: cnwicsurrett