
Running replicated WSH logon scripts
If you've tried logon.exe available on Clarence Washington's site
http://cwashington.netreach.net and also tried several other things,
then you probably know what I do - there is no logonserver variable
reported in Win9X, and the Z: drive mapping isn't always available. I
think I have a workaround for this.
I've retooled logon.exe to do the following things:
1) Determines the UNC path to the Z: drive mapping at the time it first
becomes available
2) Looks for the presence of wscript.exe in the proper directory and
installs WSH from the logonserver if needed
3) Executes login.vbs from the UNC path determined at the beginning
This doesn't necessarily give you the logonserver, but you can then
find it in your loginscript with the following code -
WshLogonServer = WScript.ScriptFullName
WshLogonServer = Left(WshLogonServer, InStr(3, WshLogonServer, "\") - 1)
There is one caveat - I've removed the ability to specify your login
script as an argument since it caused problems with Win9X and my Win2K
DCs.
For more information please email me.
Scott Pfautsch
Quote:
> I have 3 domain controllers that replicate logon scripts to each
other, and
> users run the script from the netlogon share of the %logonserver%.
This
> situation works fine with batch file logon scripts, but with WSH /
vbs logon
> scripts there is a problem. These scripts, as I understand it, must
be run
> from a batch file (eg. "cscript \\logonserver\netlogon\logon.vbs")
which
> means that you must specify a path to the script file and the server
on
> which it resides rather than use the %logonserver%. This means that
the load
> is not balanced amongst the domain controllers, and may cause errors
running
> the script should the specified server be unavailable for some reason.
> I know there is a workaround for NT machines in using "cscript
> \\%logonserver%\netlogon\logon.vbs" in the batch file, but this will
not
> work for 95 + 98 machines.
> Any suggestions how to resolve the issue would be most welcome
> Mark Salter
> LG Electronics Wales
Sent via Deja.com http://www.deja.com/
Before you buy.