help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] how to tell whether current OS is Windows 7?


From: Andy Moreton
Subject: Re: [h-e-w] how to tell whether current OS is Windows 7?
Date: Wed, 05 Jun 2013 00:07:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

On Tue 04 Jun 2013, Drew Adams wrote:

> Certain things do not work in certain Emacs versions with Windows 7
> (and perhaps Vista and Windows 8; dunno).
>
> Can one detect, from Emacs Lisp, whether the current Windows version
> is Windows 7 (or whatever)?  If so, how?

A quick look suggests that (w32-version) does this.
Results should be:
  (5 1 2600) ;; XP
  (5 2 3790) ;; XP 64bit, Server 2003, Server 2003 R2
  (6 0 6000) ;; Vista, Server 2008
  (6 1 7600) ;; Windows 7, Server 2008 R2
  (6 2 9200) ;; Windows 8, Server 2012

You can find the major and minor version numbers here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx

For Vista and later the build number changes with service packs etc.

    AndyM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]