Client for M$ Networks, unattended install

  • Thread starter Thread starter PEZ Coach
  • Start date Start date
P

PEZ Coach

Anyone point me in the direction of how to script an unattended install of
the client for M$ networks?
I have 1500 workstations (2K and XP) that will soon need it, and don't
really want to manually install on each machine.
 
PEZ said:
Anyone point me in the direction of how to script an unattended
install of the client for M$ networks?
I have 1500 workstations (2K and XP) that will soon need it,
and don't really want to manually install on each machine.
Hi,

Only way I know about, is to use snetcfg.exe:

C:\>snetcfg.exe -v -l %windir%\Inf\Netmscli.inf -c c -i ms_msclient
Trying to install 'ms_msclient'...
....done
*** You need to reboot your computer for this change to take effect ***
C:\>_


Snetcfg is a sample tool in the MS Driver Development Kit
(...\src\network\config\netcfg) that must be compiled into an exe from
the source (C/C++?) before it can be used. It can list, install and
uninstall most network components (note: Win2k and WinXP only).

More about MS Driver Development Kit here:
http://www.microsoft.com/whdc/devtools/ddk/default.mspx

Fortunately, you can download a compiled version of Snetcfg.exe (note
DIFFERENT version depending on OS) at
http://www.jsiinc.com/reghack.htm, tip 4705


Here is a VBScript that should do the job:


'--------------------8<----------------------

Set oShell = CreateObject("WScript.Shell")
SetLocale "en-us" ' do not remove

If GetOsVersionNumber = 5 Then
sSnetcfgPath = "some path to snetcfg.exe for Windows 2000 here"
Elseif GetOsVersionNumber = 5.1 Then
sSnetcfgPath = "some path to snetcfg.exe for Windows XP here"
Else
' unsupported OS
WScript.Quit
End If

sInstCmd = Chr(34) & sSnetcfgPath & Chr(34) & " -l " _
& "%windir%\Inf\Netmscli.inf -c c -i ms_msclient"

oShell.Run sInstCmd, 0, True

MsgBox "Installation of Client for Microsoft Networks is finished," _
& " reboot needed.", vbInformation + vbSystemModal, "Client installation"


Function GetOsVersionNumber()
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Determines OS by reading reg val & comparing to known values
' OS version number returned as:
' Windows 9X: 0
' Windows NT4: 4
' Windows 2k: 5
' Windows XP: 5.1
' Windows 2003: 5.2
' Windows x: >5.2
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim oShell, sOStype, sOSversion, GetOsVersionNumberReg
Set oShell = CreateObject("Wscript.Shell")

'On Error Resume Next
sOStype = oShell.RegRead(_
"HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType")
If Err.Number<>0 Then
' Hex(Err.Number)="80070002"
' - Could not find this key, OS must be Win9x
Err.Clear
GetOsVersionNumber = 0
Exit Function ' >>>
End If

GetOsVersionNumberReg = oShell.RegRead(_
"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion")
If Err.Number<>0 Then
GetOsVersionNumber = "Unknown NTx"
' Could not determine NT version
Exit Function ' >>>
End If

SetLocale "en-us" ' do not remove
GetOsVersionNumber = CSng(GetOsVersionNumberReg)
If GetOsVersionNumber > 49 Then
GetOsVersionNumber = CSng(Replace(GetOsVersionNumberReg, ".", ","))
End If

End Function

'--------------------8<----------------------
 
That appears to be what I'm looking for.
As for OS dependency, am I understanding you and the link correctly in that
I'll need separate snetcfg.exe files for 2K and XP? And what about SP
revision levels? (the link listed 2K sp2 or higher)
Thank you for your help and insight!
 
I do not think that you need to call someone an a$$hole! Really not
necessary.

There are a lot of people who, when writing 'Microsoft', use the
abbreviation 'MS'. Some people, the original poster included, use the
abbreviation 'M$' instead. Shoot, I have used it myself once or twice. But
always in a good way. I make my living from installing and supporting MS
Software! Well, I used to! Now I am moving in another direction ( web
stuff ).

You would have to ask the original poster whether he/she was trying to be
derogatory with the M$ or not. Simply assuming that he/she was trying to be
derogatory is not a good thing. You know what happens when you ass/u/me,
right?

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
PEZ said:
That appears to be what I'm looking for.
As for OS dependency, am I understanding you and the link correctly
in that I'll need separate snetcfg.exe files for 2K and XP?

Yes, they are different on Win2k and WinXP.

And what about SP revision levels? (the link listed 2K sp2
or higher)

You don't need to worry about SP revision levels, snetcfg.exe
works fine on Win2k with SP0 and SP1, as long as you add the
path to the inf file on the command line (as my example did).
 
Back
Top