Detecting XP64 versus XP32 - Autolisp Function
Do you need a function that detects whether AutoCAD is running under XP32 or XP64? I had the need today. This is what I came up with:
;;; Begin code
;;; =========================================================================
;;; Function: RLB:XP64Detector
;;; Purpose : Function to detect running under 64 or 32bit XP
;;; Author : Richard Binning
;;; Date : 4/10/2008
;;; Call : (RLB:XP64Detector "Wow6432Node")
;;; Example : (if (= 0 (RLB:XP64Detector "Wow6432Node"))
;;; (alert "32 Bit Detected")
;;; (alert "64 Bit Detected")
;;; )
;;; Params : subKey: Name of XP64 Registry Key for installing 32bit apps
;;;
;;; Local : keyVal: Value of key sought
;;; : profileStr
;;; Returns : a number greater than 0 if running under XP64
;;; Notes : Placed in use to load correct version
;;; ================================================================================
(defun RLB:XP64Detector (subKey / keyVal retVal profilesStr)
(setq keyVal nil)
(setq profilesStr (strcat "HKEY_LOCAL_MACHINE\\SOFTWARE\\" subKey))
(setq keyVal (reverse (vl-registry-descendents profilesStr)))
(vl-list-length keyVal); return value
)
;;; end code
Anyone like to test this under vista?








0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home