Local system infomation

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Local system infomation

Post by franco »

I am having problems with some users using window 7.
I have searched the forum but can not find a way to check local OS NAME.
Is there a way to check for os name inside hmg.3.4.4.
Now I am just creating a file in local computers when windows 7 is used WIN7F.TXT
in code.

Code: Select all

MAIN
PUBLIC WIN7F := .F.
IF FILE("C:\WIN7.TXT")
	WIN7F := .T.
ENDIF
	
/// I would like 
IF SYSTEM INFO OSNAME <> WINDOWS 10
	WIN7F := .T..
ENDIF
It would be nice if program checked and me not having to create the file fiscally .
All The Best,
Franco
Canada
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Local system infomation

Post by andyglezl »

You already tried with:

imagen_2021-08-06_115552.png
imagen_2021-08-06_115552.png (13.63 KiB) Viewed 605 times
Andrés González López
Desde Guadalajara, Jalisco. México.
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Local system infomation

Post by franco »

When I say msgbox(windosversion()) .......... I get Home Edition Build 19042
I does not give me windows 10
All The Best,
Franco
Canada
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Local system infomation

Post by franco »

Thanks, Andy
In windows 7 machine it does say windows 7, so this will work for me.
I wonder why in windows 10, it does not say windows 10
All The Best,
Franco
Canada
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Local system infomation

Post by Claudio Ricardo »

Hi... Try: https://www.hmgforum.com/viewtopic.php?f=5&t=6921
Function WinVer () Without parameters, return an four elements array with: Name, SP, Build, Data Width
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Local system infomation

Post by franco »

Claudio, this helps me and is what I need.
If Val ( SubStr ( WindowsVersion () [3],7)) < 7602
WIN7F := .T.
endif
Thanks for help.
Franco
All The Best,
Franco
Canada
Post Reply