Page 1 of 1 1
Topic Options
#206153 - 2012-11-08 02:52 PM logon script optimization
bastidz Offline
Fresh Scripter

Registered: 2005-07-25
Posts: 6
Loc: Germany
Is there a chance to start an independent script from a normal logon script?
The logon script maps network drives, printers and other stuff like inventory.
The logon scripts run synchronously (GPO) and it takes time. The explorer.exe waits until the scripts are ending.
My idea is to open another cmd and call the inventory script, because this takes the most of time. I tried the command “run” (RUN does not wait for the program to complete. Script execution continues immediately) but it didn’t work.
The logon script always waits of then end of the inventory.bat

Logon script Example:

Use h:
Addprinterconnection(…..)
Run @Lserver+"\netlogon\Inventory.bat”


What else can I try?

Top
#206155 - 2012-11-08 03:17 PM Re: logon script optimization [Re: bastidz]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
There have been several discussions on the concept of performing administrative tasks during logon, and why it's a bad idea. You're experiencing one of those bad ideas. \:\)

Not to say it isn't possible, but there are better methods. Admin tasks should be run from an admin location, not from the login script. Users don't always (and shouldn't) have enough rights to access information or perform tasks. The usually DO, however, have the ability to determine IF an admin task is needed..

I recently had a discussion in the forums with Robdutoit regarding this - the concept is to have a process on a server that looks for a file that contains a service request. The login script performs a simple check, and if needed, it creates a request file and then moves it to the server's share. This allows the login script to end quickly. The server finds it, determines the WHAT and WHERE, and pushes an admin task (bat file) to the requesting workstation and then invokes it with admin rights via a scheduled task. The tcLib UDF library can do this with just 4 commands - tcInit(), tcDefineTask(Args...), SetEvent(Host, Taskname), and tcExecute(host, Taskname). Look at the posts he initiated for more on this discussion.

Our Universal Login Script runs in our environment in 0.88 seconds, processing 14 drive and 5 printer resources, a message file, and (if admin) a 1-line Kix script. When we add the "detect and request" task, it adds less than 0.1 seconds to the execution, and the admin task starts within 5 seconds. The longest I've seen our script take on a LAN connection was 9 seconds, and that was processing 40+ resource connections and used six 450-entry lookup tables for Resource Rewriting. That is the client where the Detect and Request technology was first implemented, due mostly to the hundreds of small sites with 128-256K WAN connections.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#206159 - 2012-11-08 04:06 PM Re: logon script optimization [Re: Glenn Barnas]
bastidz Offline
Fresh Scripter

Registered: 2005-07-25
Posts: 6
Loc: Germany
Thanks for reply, I'll try it.

Bastian

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 235 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.06 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org