You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Announcement
Collapse
No announcement yet.
How to detect if program is being run under Platform 2 OS?
Thank you for your replies and suggestions. I have found Tom's &
Lance's technique to do the job, and I have already had in place
the code for determining if being run under pure DOS or Platform 1
OS's. Thank you both for your time, though.
Clay, I know you use one or more of the PB/Windows compilers, so why not write a little Win/EXE program you can SHELL, and have it detect the OS and write it to a disk file you can read back in your DOS program?
From PB/DOS, "SHELL winprog.exe" works fine... and it's not like speed it a concern, since it's not real likely the O/S will change during program execution....
The only information I have been able to find from Microsoft on determining Windows version from a DOS application, KB article Q75338, unfortunately doesn't cover NT-class Windows.
------------------
If you try to make something idiot-proof, someone will invent a better idiot.
How to detect if program is being run under Platform 2 OS?
I have tried INT &H2F, services &H1600 & &H160A, plus I have tried
using pbvHost, bit 8. None of them showed that my DOS program was indeed
being run under W2K. They all showed the results that are normal
if it is being run under pure DOS. They all worked as expected under
my Win98SE.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: