1

how to get the detail version information of windows from emacs. i am try to invoke "ver" windows command to get version information, but got failed.

(call-process "ver")

C-x C-e

Debugger entered--Lisp error: (file-error "Searching for program" "no such file or  directory" "ver")
call-process("ver")
eval((call-process "ver"))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
luozengbin
  • 305
  • 2
  • 11

2 Answers2

4
(shell-command "ver" t) ;; outputs version in current buffer
carrutherji
  • 1,115
  • 10
  • 18
  • (defvar my-windows-version-info (shell-command-to-string "ver")) – luozengbin Oct 31 '11 at 07:27
  • Do note that this may depend on how emacs was launched, depending on how this particular routine was implemented. If it was done "correctly" - ie, the correct C function was called to get the OS version, then you may get an older OS version than what you're actually running on, for 'program compatibility reasons'. – Arafangion Oct 31 '11 at 07:37
1

You can also query system-configuration : C-h v system-configuration RET

The documentation states:

On MS-Windows, the value reflects the OS flavor and version on which Emacs is running.

On my laptop, it says i386-mingw-nt5.1.2600

Seki
  • 11,135
  • 7
  • 46
  • 70
  • thanks! that's a good way to find out the version of microsoft windows. http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx – luozengbin Oct 31 '11 at 23:53