Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
registry
#1
How can I get the registry to tell me what version of Windows I am running?
#2
See 'Predefined variables' topic in QM help.

----

Please create normal topic titles. If you are asking about Windows version, why the title is just 'registry'?
#3
I am sorry but I checked out the Predefined variables and I still do not have a clue on how to get the registry to tell me what version of Windows I am running?
#4
I also don't know. Normally, registry is not used to get Windows version. It is in predefined variables.
#5
We do not seem to understand each other. I just want to make a macro that tells me what version of Windows I am using.

Example:

You are using - Windows Me or You are using Windows XP or you are using Windows Vista

If I do not need to use the Registry to achieve this then I am fine with that.
#6
Use Predefined variable _winver

it will tell you the version id
#7
Code:
Copy      Help
str s=getenv(_winver)
out s


this is my out
Error in Macro2: expected string expression
tip: to cast type, use operator +.

I still do not get it
#8
out _winver
#9
I tryed that befor but I do not know what 1281 means.

I found this on the fourm

Code:
Copy      Help
if(_winnt>=5)
,out "1"

if(_winver>=0x600)
,out "2"

my out is 1

I do not know what this means eather.
#10

Will this help?

Macro ( Operating System (OS) )
Code:
Copy      Help
if(_winver=0x40A)
,out "Your operating system is Windows 98"
if(_winver=0x45A)
,out "Your operating system is Windows Me"
if(_winver=0x500)
,out "Your operating system is Windows 2000"
if(_winver=0x501)
,out "Your operating system is Windows XP"
if(_winver=0x502)
,out "Your operating system is Windows 2003"
if(_winver=0x600)
,out "Your operating system is Windows Vista"
;
;-----------------
;For _winver
;-----------------
;0x40A - 98 (4.10)
;0x45A - Me (4.90)
;0x500 - 2000 (5.0)
;0x501 - XP (5.1)
;0x502 - 2003 (5.2)
;0x600 - Vista (6.0)
;-----------------
;For _winnt
;-----------------
;0 - non-NT OS (98/Me)
;5 - 2000/XP/2003
;6 - Vista
;
Taking on Quick Macros one day at a time
#11
It sounds so simple but I would have never got it. Thank You but if you do not mind one more question. How did you know that? You do not have to answer that if you do not want to. There is so much to learn.
#12
Its in the QM Help section.
#13
I feel so dumb. I found out where you received the Windows versions from. Going from one help file to the other I somehow missed it and found it when I did a help search for 0x501


Forum Jump:


Users browsing this thread: 1 Guest(s)