Re: Batch file for installs before wsh

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 05/27/04


Date: Thu, 27 May 2004 19:12:35 +0200

Thomas Bosscher wrote:

> Has anyone created a batch file to automate the installs of core components
> for use in a logon script? We are supporting multiple OS's (WinXP, Win2K,
> WinNT, Win95, Win98) and would like to have a batch file that would check
> versions of WSH, WMI, ADSI and VBScript before calling the main WSF file we
> will use to log the user onto the network.
>
> I would like to make sure all clients have the latest:
> WSH 5.6 (Includes VB 5.6)

Just install WSH 5.6 and create a flag file so you only do it once
(disregard the the last batch file in the link below that installs a
WSH security update, the update is included in the latest WSH you can
download from http://msdn.microsoft.com/downloads/list/webdev.asp ):

http://groups.google.com/groups?selm=3C9FF277.9F8392C7%40hydro.com

For Win95, you will need to install WSH 5.5, or downgrade Wshom.ocx:

http://groups.google.com/groups?selm=ug6qtZ7MEHA.2708%40TK2MSFTNGP11.phx.gbl

> WMI 1.5
> ADSI 2.5

For WMI and ADSI, you only need to check those for WinNT 4.0 and
Win9x (they are included in Win2k and WinXP).

To check version, it would be easiest to use a WSH based script:

To see if WMI is installed:
The existence of <windows system dir>\WBEM\Wbemcore.dll is one way to
test (and get the version):

http://groups.google.com/groups?selm=3E4A951B.4D8C298E%40hydro.com

I think the latest WMI Core for WinNT (and I would think for Win9x
as well) installs version 1.50.1085.0001 of Wbemcore.dll.

ADSI:

How to install the Active Directory client extension
http://support.microsoft.com/default.aspx?kbid=288358

INFO: Determining Which Version of ADSI Is Installed
http://support.microsoft.com/default.aspx?kbid=216290

Download links for latest ADSI 2.5:
http://www.microsoft.com/ntserver/nts/downloads/other/ADSI25/default.asp

-- 
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/community/scriptcenter/default.mspx


Relevant Pages

  • Re: Good WSH Book
    ... Must cover VBScript in-depth. ... Must cover WSH in-depth. ... Covers VBScript, WSH, WMI, ADSI. ...
    (microsoft.public.scripting.wsh)
  • Re: New to scripting
    ... It covers VBScript, WSH, ADSI, ADO, and WMI. ... And you can visit the Technet script center for sample scripts: ... install DSClient. ...
    (microsoft.public.scripting.vbscript)
  • Re: List of usernames on NT4, 2000 and XP...
    ... Okay, thanks. ... I did not know that your code has nothing to do with WMI. ... I'm still trying to learn these parts of WSH. ... ADSI? ...
    (microsoft.public.scripting.vbscript)
  • Re: New to scripting
    ... It covers VBScript, WSH, ADSI, ADO, and WMI. ... And you can visit the Technet script center for sample scripts: ... install DSClient. ...
    (microsoft.public.scripting.vbscript)
  • Re: Restrict use of AMI, ADSI and WScript.Shell
    ... but moved to system32\inetsrv for IIS 6. ... >> I'm not certain if ADSI has anything comparable to WMI, ... >> users to access all of the IIS:// ADSI namespace. ... >> This allows me to restrict access to files between different webs. ...
    (microsoft.public.inetserver.iis)