#72993 - 2003-02-07 02:41 AM
Re: logon script for NT, W2K and Win9x
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
|
Well, Kix IS the best login scripting tool on the planet.. (maybe the galaxy?) but-
You don't seem to be doing anything too complex yet, so let's fix the BAT problem first.
You're probably getting the Error 85 - Resource Already In Use because users have mapped their own connections using the drive letters you're defining. It's also possible that you're getting the error because the drives you've mapped are already present. (known as "Persistent Connections")
There's two approaches to making sure user-mapped shares don't interfere with login script mappings - remove them all, or remove only the ones you're going to use.
Removing them all is fast and easy: code:
net use * /delete
inserted before you perform any NET USE commands, but is the fast road to making your users hate you! (yeah - feel the power!!)
A nicer approach, but a bit more work for you, is: code:
net use T: /delete net use T: \\smbserver\share1 net use U: /delete net use U: \\smbserver\share2
and so on.. This avoids removing other shares that users have defined. Of course, option 1 is best when you want users to use ONLY the shares set up by the admin (you) in a login script. They will get tired of re-connecting their own shares after you delete them at every login!
Kix is wonderful when it comes to special mappings, like connecting to a share only when a user is a member of a particular group. Make the quick fix to your batch file and keep the users quiet while you experiment with Kix scripts.. When I was learning kix, I defined MY profile's login script to run Kix and everyone else's to run a simple BAT.
To underscore the power of Kix, consider that I've developed a login script that hasn't had a code modification since August 1999 - and yet it's been installed at over 40 customers with multiple sites. It uses an INI file to define drive and printer mappings, along with a few other settings. Even supports detection of applications and installs them on first Admin run if they aren't present. BUT - my first script started out as a replacement for one much like your batch file.
BTW - I still use this original script at home to control what my kids have access to on the LAN.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
#72994 - 2003-02-07 03:16 AM
Re: logon script for NT, W2K and Win9x
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
For starters, take a look at the KiXtart Manual as it contains example batch files and login scripts. Then read the FAQ forum, especially Kixtart Starter's Guide , KXRPC - Everything you wanted to know about KXRPC . You should also become familiar with the Windows NT/2000/XP security model. the settime part won't work unless the user has the 'Set Time' privilege, which by default only 'Power User' and up has.
You won't have to worry about replication as you are apparently using Small Business Server editions?
The KiXtart script itself would look like this:
code:
use 'k:' '\\smbserver\docs' use 'l:' '\\smbserver\libs' use 'p:' '\\smbserver\proj' use 's:' '\\smbserver\ais' use 't:' '\\smbserver\transfer' settime '\\smbserver'
Additionally, do not use the @HOME macro but use hidden shares to map personal directories. Windows 9x cannot deep map, Windows NT needs an external utility to deep map.
Finally, experiment with small scripts to figure out what thet do and use DEBUG ON to trace the steps of a script. Use @ERROR/@SERROR to evaluate potential errors.
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
#72995 - 2003-02-07 04:39 PM
Re: logon script for NT, W2K and Win9x
|
Jack Lothian
MM club member
   
Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
|
If you have Win9x clients, they can not use the default user directories created by the NT Server's User Manager. (They are not really shares.) You must create actual hidden shares for each user. All OS clients can map these.
Also, I recommend reading the first 15 to 20 pages of the manual, it includes a wealth of key points. You don't need to read the list of functions, commands & macros until you need them but the introduction is vital. It is a pain, but it will save you a lot of time in the end.
Also, most of the moderators include a number of important info links in their signatures. Follow any link that you think might help you. [ 07. February 2003, 16:42: Message edited by: Jack Lothian ]
_________________________
Jack
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 302 anonymous users online.
|
|
|