chpicker
Programmer
- Apr 10, 2001
- 1,316
I could have sworn I'd seen a question like this before, but I just can't seem to find it anywhere. How can you find out what version of Windows your app is running under? Our organization uses many computers with almost a different OS on each: Windows 98, NT 4.0, 2000, and XP. Wasn't there a command you could use to determind which one you're in?
I came up with this, but it's very clunky. I don't like using the RUN command if I can possibly avoid it:
[tt]
RUN ver > c:\version.out
cVersion = FILETOSTR("c:\version.out"
[/tt]
Strangely enough, running this command in Windows 2000, you end up with this string, which isn't what I expected:
[tt]
MS-DOS Version 5.00.500
[/tt]
Any suggestions? Is there a FoxPro command that can do this? An API function perhaps? I'm running VFP 6.0 SP5.
Ian
I came up with this, but it's very clunky. I don't like using the RUN command if I can possibly avoid it:
[tt]
RUN ver > c:\version.out
cVersion = FILETOSTR("c:\version.out"
[/tt]
Strangely enough, running this command in Windows 2000, you end up with this string, which isn't what I expected:
[tt]
MS-DOS Version 5.00.500
[/tt]
Any suggestions? Is there a FoxPro command that can do this? An API function perhaps? I'm running VFP 6.0 SP5.
Ian