|
I've got another question now after seeing the script.
Why do you (or anyone) install and set a default printer during login EVERY TIME the user logs on. Unless it is a roaming profile or something... this sure seems like a waste of time and bandwidth. i.e. If I log off and back on 10 times during the course of the day... the logon script would remap my printer over and over.
If you're using AD which you say, you can set a GPO that assigns printers based on membership in an OU.
There are other ways of doing this much cleaner as well. Jens likes to use .ini files which seem to work quite well.
Doing nothing else with cleaning your script up, I'd opt to use SELECT CASE statements over that many IFs Just looks cleaner to me.
But as it appears it is done by workstation name. Set it once and forget it, or use the .INI method.
I'll leave any further ideas/code to others as there are many ways of doing it, I just don't see why its being done in the first place. Set it, and forget it. Also, this is KiXtart scripting, not batch scripting. All these NEXT label statements are over kill. [ 24. March 2003, 09:36: Message edited by: NTDOC ]
|