robierzo Posted May 30, 2013 Posted May 30, 2013 Hello. I need to know which platform has my operating system: 32 or 64 bits. How I can know? Regards. Quote
ReMark Posted May 30, 2013 Posted May 30, 2013 You want a lisp program to tell you whether your computer and/or software is 32-bit or 64-bit? Quote
BlackBox Posted May 30, 2013 Posted May 30, 2013 You can pull my 64Bit-p function from this old post, and the wrapping function can offer you an example of usage: [color=black] [/color](defun c:MdiTab (/ 64Bit-p) ;; © RenderMan, 2011 (vl-load-com) [color="blue"](defun 64Bit-p () [color="green"];; © RenderMan, 2011 ;; Returns T if version is 64-Bit ;; Example: (64bit-p)[/color] (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")) T nil))[/color] ((lambda (key sdi / mditab flag) (if (and sdi (setq mditab (cond ((vl-string-search "17" key) ; 2007, 2008, 2009 (if (64Bit-p) "mditab17x64.arx" "mditab17.arx")) ((vl-string-search "18" key) ; 2010, 2011, 2012 (if (64Bit-p) "mditab18x64.arx" "mditab18.arx")))) (setq flag (findfile mditab)) (not (vl-position mditab (arx)))) (and (arxload mditab) (princ "\rMDITAB: LOADED ")) (cond (flag (and (arxunload mditab) (princ "\rMDITAB: UNLOADED "))) (mditabs (prompt (strcat "\n** \"" mditab "\" cannot be found ** "))) (sdi (prompt "\n** This AutoCAD version not supported ** ")) ((prompt "\n** Command not allowed in SDI mode ** "))))) (vlax-product-key) (= 0 (getvar 'sdi))) (princ)) Quote
Lee Mac Posted May 30, 2013 Posted May 30, 2013 Hello. I need to know which platform has my operating system: 32 or 64 bits. How I can know? I use: (getenv "PROCESSOR_ARCHITECTURE") So to test for 64-bit: (defun 64bit-p ( ) (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))) Quote
ReMark Posted May 30, 2013 Posted May 30, 2013 You can also use Windows own "run" function and type msinfo32.exe. At the screen that comes up next you can tell at a glance if your system is 32-bit or 64-bit. Quote
BlackBox Posted May 30, 2013 Posted May 30, 2013 (defun 64bit-p ( ) (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))) I 'spose that the If statement in my old offering above is a bit redundant. Quote
Lee Mac Posted May 30, 2013 Posted May 30, 2013 I 'spose that the If statement in my old offering above is a bit redundant. yup. .... Quote
robierzo Posted May 30, 2013 Author Posted May 30, 2013 O.K. Thank you very much to all. It is great. Regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.