Re: Script Execution Over Network

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:uKE6YEiYJHA.5476@xxxxxxxxxxxxxxxxxxxxxxx

"Justin R." <JRusbatch@xxxxxxxxx> wrote in message
news:f0db0038-7739-4369-97cd-96d0865c5f71@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Dec 19, 12:46 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxxxxxxxxxxxxxxxx> wrote:
"Pegasus (MVP)" <I....@xxxxxxxxxx> wrote in message

news:OHiOBMeYJHA.5156@xxxxxxxxxxxxxxxxxxxxxxx





"Justin R." <JRusba...@xxxxxxxxx> wrote in message
news:9e2823a0-65b3-4495-bc99-b4fcb984fd4d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm currently working on revising my company's logon script. When a
user logs on, a remote batch file is executed that checks if the
client already has a file named "logonscript.vbs" on their PC. If
they do, it generates and compares the CRC checksum of the file to a
"logonscript.vbs" that exists on the domain controller. If the two
CRCs match, we know that the client has the latest version of the
script. However, if they do not, the latest version of the script is
copied from the domain controller to the client, and then executed by
the client workstation.

This seems like a lot of back-and-forth to me, and I'm having trouble
gauging whether it's the most efficient way of doing things. Part of
me wants to simplify things by simply running "logonscript.vbs" from
the domain controller without making a copy on the client's PC first.
This would eliminate the need to perform a CRC checksum comparison.
Is there a way for me to figure out how much bandwidth this would cost
on a per-logon basis? Any thoughts or suggestions? I'm pulling my
hair out over this (it doesn't really need much help, though, but
that's a separate issue entirely).

Thanks in advance.

Unless you have a huge logon script, the bandwidth requirements would
be
minimal. What is the size of your script? A few kBytes? Trivial!
Remember:
A 100 MBits Ethernet can transfer up to 10 MBytes per second.

If you're still reluctant to have your script reside on the server then
you could use "xcopy.exe /d" to ensure that the user has the latest
version of the script. This is a single line of code and it is much
simpler than creating and comparing CRC checksums.

Of course there is the bandwidth required to copy the logon script.

--
Richard Mueller
MVP Directory Services
Hilltop Lab -http://www.rlmueller.net
--

I think I know what you mean, but I don't think you would've posted if
your point was that simple. Can you elaborate, Richard?

------
I don't know the details, so I hesitate to say too much. However, I think
more bandwidth is required to copy a program than to execute the program.

And you are forgetting the bandwidth taken up by the program that reads the
script on the server to compute its CRC checksum...

When a program is run it is loaded into memory, which is fast, so the
transfer over the network doesn't need to wait much. A logon script should
run from local memory. When a program is copied the local drive controller
is the bottleneck. The same number of bytes are transferred, but more
traffic may be needed.

Long ago when we had 10 Mbps networks and 100 MHz clients we never had
trouble running logon scripts over the network, even when many people
logged on at once (such as after a server reboot). And we had some
elaborate logon scripts. The exception was logon scripts that installed
software over the network. That caused problems.

My recollection is that batch files are loaded and run one line at a time,
but VBScript programs (and all *.exe programs) are loaded all at once and
then run.

That is exactly right. If you have a complex batch script or set of them,
there *might* be some efficiencies involved in copying them down locally,
but there are reasons why you would not want to, including:

- all users would need to have write access to a local folder assumed to
contain trusted executables;
- complexity itself will increase the cost of maintenance and the risk of
changes causing unexpected errors.

My suggestion: concentrate on simplifying the code itself, rather than
introducing complexity, as the best way to make your logon script operate
efficiently (and reliably).


/Al


.



Relevant Pages

  • Re: Script Execution Over Network
    ... a remote batch file is executed that checks if the ... we know that the client has the latest version of the ... Of course there is the bandwidth required to copy the logon script. ... more bandwidth is required to copy a program than to execute the program. ...
    (microsoft.public.scripting.vbscript)
  • Re: Script Execution Over Network
    ... we know that the client has the latest version of the ... more bandwidth is required to copy a program than to execute the program. ... trouble running logon scripts over the network, ... If reading the logon batch file on a line-by-line basis is a speed/bandwidth ...
    (microsoft.public.scripting.vbscript)
  • Re: Script Execution Over Network
    ... a remote batch file is executed that checks if the ... we know that the client has the latest version of the ... However, if they do not, the latest version of the script is ... Of course there is the bandwidth required to copy the logon script. ...
    (microsoft.public.scripting.vbscript)
  • Re: logon script on DC?
    ... logon script through group policies for the domain. ... it both through the group policies for the local server. ... I can run it from the client if I run the full ... >> I tried putting the batch file in their profile in AD. ...
    (microsoft.public.win2000.active_directory)
  • Re: Loginscript occasionally failing
    ... but I have several times seen reports where a batch file failed ... uses "z:\Login.bat" to launch the logon script. ... the drive mapping can disappear. ... clients with NT or above use UNC rather than a temporary drive to ...
    (microsoft.public.windows.server.scripting)