Alaska Software Inc. - OS()
Username: Password:
AuthorTopic: OS()
Moshe YardenOS()
on Tue, 22 Jan 2008 12:31:03 +0200
Hi,

Under Clipper, I need to find if the operating system is Win98 or WinXP. 
Using OS(), under WinXP, returns: DOS 5.00.

Is there other way to find the Operatin System?


Thanks,
Moshe Yarden
Pascal BoivinRe: OS()
on Tue, 22 Jan 2008 08:32:57 -0500
Look in the help file about OS:

Os([<nOsId>])

It can return many values.

************************
* Pascal Boivin        *
* N.B. Automation inc. *
************************
Pascal BoivinRe: OS()
on Tue, 22 Jan 2008 08:35:27 -0500
> Using OS(), under WinXP, returns: DOS 5.00.

Btw, it is strange... on my computer OS() with no parameter return this:
Windows XP 05.01 Build 02600 Service Pack 2
Thomas Braun
Re: OS()
on Tue, 22 Jan 2008 16:13:48 +0100
Pascal Boivin wrote:

>> Using OS(), under WinXP, returns: DOS 5.00.
> 
> Btw, it is strange... on my computer OS() with no parameter return this:
> Windows XP 05.01 Build 02600 Service Pack 2

I suspect Moshe is talking about Clipper, not Xbase++...

regards
Thomas
Moshe YardenRe: OS()
on Tue, 22 Jan 2008 17:18:59 +0200
Yes. I'm talking about Clipper.


"Thomas Braun" <spam@software-braun.de> wrote in message 
news:1xe53uuibbskq$.12dd0e5dyo8rf.dlg@40tude.net...
> Pascal Boivin wrote:
>
>>> Using OS(), under WinXP, returns: DOS 5.00.
>>
>> Btw, it is strange... on my computer OS() with no parameter return this:
>> Windows XP 05.01 Build 02600 Service Pack 2
>
> I suspect Moshe is talking about Clipper, not Xbase++...
>
> regards
> Thomas
Rodd Graham Re: OS()
on Tue, 22 Jan 2008 16:31:13 +0000
Hello Moshe,

> Yes. I'm talking about Clipper.

Are you migrating to Xbase++?  If not, why the Xbase++ NG vs alternatives 
more aligned with Clipper?

You are certainly welcome in these NG's, I am just surprised that Xbase++ 
NG's provide the best available Clipper support.  Is nothing else left?

FWIW, the Harbour/xHarbour projects are more focussed on duplicating Clipper. 
 They may also be Clipper resources without the Xbase++ twist.

Regards,

Rodd Graham, Consultant
Graham Automation Systems, LLC
Pablo BotellaRe: OS()
on Tue, 22 Jan 2008 16:42:44 +0100
Hi,
> Is there other way to find the Operatin System?

function IsXp()
RUN  ("VER > ver.txt")
return ( "XP" $ MemoRead("ver.txt") )

I know not the smartest solution, but probably can work

Regards,
Pablo Botella
Moshe YardenRe: OS()
on Tue, 22 Jan 2008 17:49:11 +0200
Thanks Pablo.
I'll try it.

Regards,
Moshe

"Pablo Botella" <pbn_NOSPAM_@pablob.com> wrote in message 
news:1fcdcdbc$43f72516$127e@news.alaska-software.com...
> Hi,
>> Is there other way to find the Operatin System?
>
> function IsXp()
> RUN  ("VER > ver.txt")
> return ( "XP" $ MemoRead("ver.txt") )
>
> I know not the smartest solution, but probably can work
>
> Regards,
> Pablo Botella
Jorge BorlandoRe: OS()
on Wed, 23 Jan 2008 00:57:02 -0300
hello, in clipper i test the environment variables ie
GetEnv("OS")  in windows 98 are empty,
                        in w2k and xp = Windows_NT
GetEnv( "SystemRoot") in windows 98 are empty,
                                     in w2k = C:\WINNT
                                     in wxp  = C:\WINDOWS

this information in w2k an xp save in the registry in 
HKLM\System\CurrentControlSet\Control\Session Manager\Environment

but when i install my aplication in w2k or wxp i add to the registry with 
the information in the command.com for ie :
%WINDIR%\system32\REG.EXE add HKCU\Environment /v OPERATIVO  /d WINXP
then i test with GetEnv( "OPERATIVO" )   = WINXP
is the same that put the lines in autoexec.nt
 then in w98 GetEnv( "OPERATIVO" ) = empty  => w98

regards

"Moshe Yarden" <yarden@emco.co.il> escribi en el mensaje 
news:1d87f7f5$21e05b17$16aa@news.alaska-software.com...
> Thanks Pablo.
> I'll try it.
>
> Regards,
> Moshe
>
> "Pablo Botella" <pbn_NOSPAM_@pablob.com> wrote in message 
> news:1fcdcdbc$43f72516$127e@news.alaska-software.com...
>> Hi,
>>> Is there other way to find the Operatin System?
>>
>> function IsXp()
>> RUN  ("VER > ver.txt")
>> return ( "XP" $ MemoRead("ver.txt") )
>>
>> I know not the smartest solution, but probably can work
>>
>> Regards,
>> Pablo Botella
>
>