Running replicated WSH logon scripts 
Author Message
 Running replicated WSH logon scripts

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



Mon, 14 Oct 2002 03:00:00 GMT  
 Running replicated WSH logon scripts
on win9x machines, the logon server is mapped to the z: drive.


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




Mon, 14 Oct 2002 03:00:00 GMT  
 Running replicated WSH logon scripts
I don't think so. I know that a "z:" is, by default, mapped to the hime
directory on NT machines but have never come across anything like that in
Win 9x.

NT provides an environment variable for the logon server, but 9x doesn't.

Mark Salter
LG Electronics Wales


Quote:
> on win9x machines, the logon server is mapped to the z: drive.



> > 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




Mon, 14 Oct 2002 03:00:00 GMT  
 Running replicated WSH logon scripts
Here is our logon.bat that works on 95/98/NT/2000.

Echo Please Wait...................

If "%OS%" == "Windows_NT" goto WINNT
call wscript.exe %0\..\logon.vbs
dir c:\windows\system /s >null
call %0\..\smslogon.bat
goto EXIT
:WINNT
start /min %0\..\logon.vbs
call %0\..\smslogon.bat
:EXIT


Quote:
> I don't think so. I know that a "z:" is, by default, mapped to the hime
> directory on NT machines but have never come across anything like that in
> Win 9x.

> NT provides an environment variable for the logon server, but 9x doesn't.

> Mark Salter
> LG Electronics Wales



> > on win9x machines, the logon server is mapped to the z: drive.



> > > 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




Mon, 14 Oct 2002 03:00:00 GMT  
 Running replicated WSH logon scripts
Check out the Win32 Scripting site by Clarence Washington,
http://cwashington.netreach.net.  In the "scriptDEPO" for VBScript:
http://cwashington.netreach.net/script_repository/repository.asp?Scri...
vbscript, he has a vbscript to determine the logonserver for Win9x clients.
Just search for "logonserver".  I'm trying it out now.  Only problem I've
discovered so far is that it's tied to the Z: drive.  On a machine with
something else for lastdrive, it isn't working properly, so I'm having to
modify the code for a little more intelligence.

Hope this helps.

John Adelman
Computer Sciences Corporation


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




Tue, 15 Oct 2002 03:00:00 GMT  
 Running replicated WSH logon scripts
cscript %0\..\logon.vbs

The %0\..\ "trick" works fine on Windows 95, 98, NT 4, and Windows 2000.


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




Tue, 15 Oct 2002 03:00:00 GMT  
 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.


Sun, 20 Oct 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. WSH logon script does not run...

2. Running WSH logon Scripts from NT4 Domain controllers

3. Run WSH logon script before NT shell starts?

4. How can I get logon server name and IP address from logon script using wsh

5. Running Scripting Host Files as Logon Script

6. Again: No username while running WSH.Network in W95 logon

7. WSH Script in NT Logon Script

8. logon.exe script.vbs in profile (logon script)

9. Running a Visual Basic Script During Logon

10. Logon Date/Time Script Won't Run

11. How do I run a .vbs file a NT logon script

12. Error running logon script

 

 
Powered by phpBB® Forum Software