Page 1 of 1
Knowing if W7
Posted: Wed Feb 24, 2010 1:09 pm
by jouhmg
English by Google
Hi:
Can one know if the OS is W7?
TIA
jouhmg
Español
Hola:
¿ Se puede saber si el SO es W7 ?
Gracias
jouhmg
Re: Knowing if W7
Posted: Wed Feb 24, 2010 1:28 pm
by mustafa
Hello
I think with: WindowsVersion ()
can determine the version of windows
Gretings
Hola
creo que con: WIndowsVersion()
se puede saber la versión de windows
Saludos
Mustafa

Re: Knowing if W7
Posted: Wed Feb 24, 2010 2:09 pm
by gfilatov
jouhmg wrote:
Hi:
Can one know if the OS is W7?
Hi jouhmg,
Try to add the following C-function in your project:
Code: Select all
HB_FUNC( ISSEVEN )
{
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
{
hb_retl(TRUE);
}
else
{
hb_retl(FALSE);
}
}
Usage:
Code: Select all
If IsSeven()
MsgInfo('Windows 7 is detected!')
EndIf
...
I hope that helps

Re: Knowing if W7
Posted: Wed Feb 24, 2010 2:35 pm
by mustafa
Hello I found this magnificent function
created by our great friend Bicahi Esgici
called MsgMulti
On my computer tells me ----> Windows XP
Professional Service Pack 2 Build 2600 <-----
If it can not be used to see if it is
Windows 7 installed
Greetings
Hola he encontrado esta magnifica función
creada por nuestro gran amigo Bicahi Esgici
que se llama MsgMulti
En mi Pc me indica ----> Windows XP
Profesional Service Pack 2 Build 2600 <-----
No se si puede servir para ver si está
instalado Windows 7
Saludos
Mustafa
Re: Knowing if W7
Posted: Wed Feb 24, 2010 2:39 pm
by jouhmg
English by Google
Hi:
Thanks, but I think it only goes to W. Vista.
jouhmg
Español
Hola:
Gracias, pero creo que sólo llega a W.Vista.
jouhmg
Re: Knowing if W7
Posted: Wed Feb 24, 2010 5:55 pm
by mol
Hello Mustafa!
I've ran this program on my notebook with Win 7 Home Premium 64bit and I've got only:
Home Edition Build 7600
Re: Knowing if W7
Posted: Wed Feb 24, 2010 6:49 pm
by Roberto Lopez
jouhmg wrote:English by Google
Hi:
Can one know if the OS is W7?
TIA
jouhmg
Español
Hola:
¿ Se puede saber si el SO es W7 ?
Gracias
jouhmg
WindowsVersion() function must be updated to work with Win7. I've added to the current bug list.
Meanwhile, you could use the Grigory function or two functions already present in HMG:
- WINMAJORVERSIONNUMBER()
- WINMINORVERSIONNUMBER()
For Win7 these functions will return 6 and 1 respectively. ie:
msginfo ( str (WINMAJORVERSIONNUMBER()) + ' ' + str(WINMINORVERSIONNUMBER()) )
ehhh... yes... the Windows 7 version number is 6.1

Re: Knowing if W7
Posted: Sat Feb 27, 2010 3:28 am
by jouhmg
English by Google
Hi:
Thanks to all.
jouhmg
Español
Hola:
Gracias para todos.
jouhmg