Hola
Existe en fivewin alguna funcion que me devuelva la version de windows donde corre el exe ?
Un saludo
Version de Windows
- Antonio Linares
- Site Admin
- Posts: 42615
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 53 times
- Been thanked: 88 times
- Contact:
En source\function\errsysw.prg tienes un ejemplo de uso:
Code: Select all | Expand
local aVersions := GetVersion()
...
cErrorLog += " Windows version: " + ;
AllTrim( Str( aVersions[ 1 ] ) ) + "." + ;
AllTrim( Str( aVersions[ 2 ] ) ) + ", Build " + ;
AllTrim( Str( aVersions[ 3 ] ) ) + ;
" " + aVersions[ 5 ] + CRLF + CRLF
- Antonio Linares
- Site Admin
- Posts: 42615
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 53 times
- Been thanked: 88 times
- Contact:
Solo tienes que comprobar los valores que te devuelven aVersions[ 1 ] y aVersions[ 2 ] para saber si es Win95, Win98, WinXP, Vista, etc.
El siguiente código:
Devuelve:
6.0 para Vista, 5.2 para XP, 4.10 para Win98 y 4.0 para Win95
El siguiente código:
Code: Select all | Expand
function Main()
MsgInfo( AllTrim( Str( GetVersion()[ 1 ] ) ) + "." + ;
AllTrim( Str( GetVersion()[ 2 ] ) ) )
return nil
Devuelve:
6.0 para Vista, 5.2 para XP, 4.10 para Win98 y 4.0 para Win95