I am needing to deploy some software to workstations that are Windows 95
(this is not a typo).

What I have done so far is define a BAT file in AD for the User Login Script
that uses the START \\myvbScript.vbs.

The vbScript then tries to make a WINMGTS: connection and when it fails
(Err.Number = 432, Class does not exist) it calls my 9xInstall.BAT file. For
the most part this works since we do not have the WMI Core Environment out
there but I'd rather be checking for the OS specifically, since that is what
I really need to know. Unfortunately, I cannot find a way to do this without
using WMI.

Is there an object I can use to get the OS in vbScript or even a command in
the BAT file that I can rely on?

As always, thanks.
Bart Perrier

Re: Determining Win95 machines via login script by Torgeir

Torgeir
Thu Jul 21 10:24:13 CDT 2005

Bart Perrier wrote:

> I am needing to deploy some software to workstations that are Windows 95
> (this is not a typo).
>
> What I have done so far is define a BAT file in AD for the User Login Script
> that uses the START \\myvbScript.vbs.
>
> The vbScript then tries to make a WINMGTS: connection and when it fails
> (Err.Number = 432, Class does not exist) it calls my 9xInstall.BAT file. For
> the most part this works since we do not have the WMI Core Environment out
> there but I'd rather be checking for the OS specifically, since that is what
> I really need to know. Unfortunately, I cannot find a way to do this without
> using WMI.
>
> Is there an object I can use to get the OS in vbScript or even a command in
> the BAT file that I can rely on?
>
Hi,

To detect the OS version, see e.g. the function GetOsVersionNumber here
(uses WSH's RegRead to determine the OS version):
http://groups.google.co.uk/group/microsoft.public.windowsxp.setup_deployment/msg/0578b298bc7c08a9?dmode=source&hl=en

It will return 0 for Win9x and WinMe.


If you need to be able to difference on Win95, Win98 and WinMe, just
say so.


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Re: Determining Win95 machines via login script by Dean

Dean
Thu Jul 21 11:03:28 CDT 2005

Maybe -

ver | find "Windows 95" >nul
if errorlevel 1 (
goto :notWindows95
) else (
goto :Windows95
)

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

Bart Perrier wrote:
> I am needing to deploy some software to workstations that are Windows
> 95 (this is not a typo).
>
> What I have done so far is define a BAT file in AD for the User Login
> Script that uses the START \\myvbScript.vbs.
>
> The vbScript then tries to make a WINMGTS: connection and when it
> fails (Err.Number = 432, Class does not exist) it calls my
> 9xInstall.BAT file. For the most part this works since we do not have
> the WMI Core Environment out there but I'd rather be checking for the
> OS specifically, since that is what I really need to know.
> Unfortunately, I cannot find a way to do this without using WMI.
>
> Is there an object I can use to get the OS in vbScript or even a
> command in the BAT file that I can rely on?
>
> As always, thanks.
> Bart Perrier



Re: Determining Win95 machines via login script by Bill

Bill
Thu Jul 21 11:31:51 CDT 2005

Bart Perrier wrote:

> I am needing to deploy some software to workstations that are Windows 95
> (this is not a typo).
>
> What I have done so far is define a BAT file in AD for the User Login Script
> that uses the START \\myvbScript.vbs.
>
> The vbScript then tries to make a WINMGTS: connection and when it fails
> (Err.Number = 432, Class does not exist) it calls my 9xInstall.BAT file. For
> the most part this works since we do not have the WMI Core Environment out
> there but I'd rather be checking for the OS specifically, since that is what
> I really need to know. Unfortunately, I cannot find a way to do this without
> using WMI.
>
> Is there an object I can use to get the OS in vbScript or even a command in
> the BAT file that I can rely on?

You can also try my freeware utility osver.exe.

http://www.cybermesa.com/~bstewart/wast.html

--
Bill Stewart

Re: Determining Win95 machines via login script by Todd

Todd
Thu Jul 21 16:39:23 CDT 2005


"Dean Wells [MVP]" <dwells@mask.msetechnology.com> wrote in message
news:u8V4#2gjFHA.2920@TK2MSFTNGP14.phx.gbl...
> Maybe -
>
> ver | find "Windows 95" >nul
> if errorlevel 1 (
> goto :notWindows95
> ) else (
> goto :Windows95
> )

OS detection code needs to work on all possible OS's. The IF command syntax
above will not work on Win9x/ME systems. Also Win9x systems only see the
first eight characters of label names. If OP uses a goto:Windows95 and
goto:Windows98, they will both point to the first :Windows9? label on Win9x
systems.

ver | find "Windows 95" >nul
if not errorlevel 1 goto :Win95
ver | find "Windows 98" >nul
if not errorlevel 1 goto :Win98
ver | find "Windows ME" >nul
if not errorlevel 1 goto :WinME
...

--
Todd Vargo (double "L" to reply by email)