| From: | "Zeugswetter Andreas DCP SD" <ZeugswetterA(at)spardat(dot)at> |
|---|---|
| To: | "Steve Atkins" <steve(at)blighty(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: automatic system info tool? |
| Date: | 2006-07-18 09:26:41 |
| Message-ID: | E1539E0ED7043848906A8FF995BDA579012B4330@m0143.s-mxs.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> >> If you can open a command shell you can get the OS version with the
> >> 'ver' command under Windows:
> >>
> >> C:\>ver
> >>
> >> Microsoft Windows XP [Version 5.1.2600]
> >
> > How do you do this from a program though. Under UNIX uname() is a
> > function call as well as a program. It returns the os name, version,
> > hostname and system type.
> >
>
> GetVersionEx() will get you the windows version, service
> pack, etc IIRC.
in perl:
use POSIX;
print join(',',POSIX::uname()),"\n";
prints:
Windows NT,hostname.domain.com,5.0,Build 2195 (Service Pack 4),x86
Works on all Platforms.
(more detail on Win with: use Win32; join(' ', Win32::GetOSVersion()),
"\n";)
Andreas
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Hallgren | 2006-07-18 09:56:58 | Re: plPHP and plRuby |
| Previous Message | Tzahi Fadida | 2006-07-18 09:20:01 | missing tuplestore_gettuple |