Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting Windows ME with IS 5.5(5.1)

9 views
Skip to first unread message

br...@galaxycorp.com

unread,
Nov 8, 2000, 3:00:00 AM11/8/00
to
Hi,

I have been trying to enhance the _GetOS function to handle Windows ME
as well but I can't get the right result.

The documentation I have found on Windows ME tells me that WinMinor
should be 40 for Windows ME as opposed to 10 for Windows 98, but when I
use GetSystemInfo(WINMINOR,lWinMinor) the result is 10 on ME and not 40!

Reading previus posts in this newsgroup indicates that my method ought
to be correct. Perhaps it's the GetSystemInfo that is not working
correctly or maybe I have missed something?

Kind regards

Bruno Brøsted, TEXTware A/S


PS. My altered version og _GetOS looks like this:
-------------
prototype _GetOS (BYREF LONG);

#define IS_WINDOWSNT351 3301
#define IS_WINDOWSNT40 3302
#define IS_WINDOWS98 3303
#define IS_WINDOWS2000 3304
// Handling of Windows ME added by BB 7-Nov-00 - START
#define IS_WINDOWSME 3305
// Handling of Windows ME added by BB 7-Nov-00 - END
-------------
function _GetOS (lOS)
string buffer;
STRING szIgnore, szShellMgr;
LONG lISType, lWinMajor, lWinMinor;
begin
GetSystemInfo (OS, lOS,szIgnore);

if (lOS = IS_WINDOWS) then
return(0);
elseif (lOS = IS_WINDOWS95) then
GetSystemInfo (ISTYPE, lISType, szIgnore);

if (lISType = 32) then
GetSystemInfo (WINMINOR, lWinMinor, szIgnore);

// Showing Debug info - START
NumToStr(buffer,lWinMinor);
MessageBox("lWinMinor"+buffer,INFORMATION);
// Showing Debug info - END

if (lWinMinor = 10) then
lOS = IS_WINDOWS98;
return 0;
else
// Handling of Windows ME added by BB 7-Nov-00 - START
if (lWinMinor = 40) then
lOS = IS_WINDOWSME;
return 0;
else
lOS=IS_WINDOWS95;
return 0;
endif;
// Handling of Windows ME added by BB 7-Nov-00 - END
endif;

else
lOS = IS_WINDOWS95;
return -1;
endif;

elseif (lOS = IS_WINDOWSNT) then
GetSystemInfo (ISTYPE, lISType, szIgnore);

if (lISType = 32) then
GetSystemInfo (WINMAJOR, lWinMajor, szIgnore);

if (lWinMajor > 3) && (lWinMajor = 4) then
lOS = IS_WINDOWSNT40;
return 0;
elseif(lWinMajor > 3)&& (lWinMajor != 4) then
lOS = IS_WINDOWS2000;
return 0;
else
lOS=IS_WINDOWSNT351;
return 0;
endif;

else
QueryShellMgr (szShellMgr);

if (szShellMgr = "Explorer.exe") then
lOS = IS_WINDOWSNT40;
return 0;
elseif (szShellMgr = "Progman.exe") then
lOS = IS_WINDOWSNT351;
return 0;
else
lOS = IS_UNKNOWN;
return -1;
endif;

endif;

endif;

end;


Stefan Krueger

unread,
Nov 21, 2000, 3:00:00 AM11/21/00
to
Windows ME is version 4.90, so WINMINOR is 90, not 40.

(More details can be found in the latest InstallShield newsletter -
subscribe at http://www.installshield.com )

--
Stefan Krueger - Independent Setup Consultant
<<reply-to address is invalid to avoid spam>>

Visit InstallSite at http://www.installsite.org to download
free code samples, tips, tools and more...
For information about individual support and consulting services
please send a blank mail to the autoresponder at in...@installsite.org

Stefan Krueger and the InstallSite.org web site are not affiliated
with InstallShield Software Corporation.


<br...@galaxycorp.com> schrieb im Newsbeitrag
news:3A098536...@galaxycorp.com...


> Hi,
>
> I have been trying to enhance the _GetOS function to handle Windows
ME
> as well but I can't get the right result.
>
> The documentation I have found on Windows ME tells me that WinMinor
> should be 40 for Windows ME as opposed to 10 for Windows 98, but
when I
> use GetSystemInfo(WINMINOR,lWinMinor) the result is 10 on ME and not
40!
>
> Reading previus posts in this newsgroup indicates that my method
ought
> to be correct. Perhaps it's the GetSystemInfo that is not working
> correctly or maybe I have missed something?
>
> Kind regards
>

> Bruno Brřsted, TEXTware A/S

0 new messages