PC Review


Reply
Thread Tools Rate Thread

Determining Win95 machines via login script

 
 
Bart Perrier
Guest
Posts: n/a
 
      21st Jul 2005
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


 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      21st Jul 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/mic...e=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/scr...r/default.mspx
 
Reply With Quote
 
Dean Wells [MVP]
Guest
Posts: n/a
 
      21st Jul 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



 
Reply With Quote
 
Bill Stewart
Guest
Posts: n/a
 
      21st Jul 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
 
Reply With Quote
 
Todd Vargo
Guest
Posts: n/a
 
      21st Jul 2005

"Dean Wells [MVP]" <(E-Mail Removed)> wrote in message
news:u8V4#(E-Mail Removed)...
> 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)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining which machines I've logged on to Herb Martin Microsoft Windows 2000 Active Directory 16 29th Nov 2004 11:44 PM
Determining which machines I've logged on to Herb Martin Microsoft Windows 2000 16 29th Nov 2004 11:44 PM
sharing a printer on a XP pro to win95 machines =?Utf-8?B?RGFubWFu?= Windows XP Networking 1 22nd Nov 2004 05:17 PM
GPO not launching login script successfully on client machines. 3/22/2004 8:23 AM PST GT Microsoft Windows 2000 Group Policy 1 23rd Mar 2004 08:10 PM
Can't see Win95/98 machines in workgroup =?Utf-8?B?S1JHcmFudGhhbQ==?= Microsoft Windows 2000 Networking 3 10th Nov 2003 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:01 AM.