//flex table opened by JP

Click to See Complete Forum and Search --> : Login scripts with WinNT 4.0


Undeadlord
04-17-2001, 06:52 AM
Ok, I need to add Mtask to about 40 users computers so they will run defrag and scandisk at certain times. They all login throguh WinNT 4.0 machine. Is there anyway to write a script that does this. It would save me time, plus I would learn how to do NT scripting. Any ideas or links to pages that might help?

Undeadlord

mourikise
04-18-2001, 02:59 AM
Logon as Domain Admin at the Primary Domain Controller Server (PDC Server). Go to the C:\WINNT\system32\Repl\Import\Scripts. There create a batch file (*.bat) that will be the NT script you need to run. Then run User Manager for Domains. For every user (this is quite painful) go to Profile and at the 'Logon Script Name' field type the name of the batch file without the full path, eg. test_script.bat . This way every time a user logs on this script will run. No mapping or any other configuration is necessary.

Now, the other problem is what this script will contain. I cannot give lessons on-line from this forum (even if I had the required knowledge to do this http://www.sysopt.com/forum/wink.gif ) but I can tell you that you may need to use the at command. Searh at the Windows help for detailed info and examples. Below, I just "copy-paste" the script I've created for the Domain at my work. No scheduling included, but it may give you a clue of how a script looks like...


@echo off
rem --== Login script for Dominium Investments S.A. ==--
rem --== Created by Fred ==--

echo Welcome back %USERNAME% !!

:LOGO

echo ..Copying New Logo
if not exist c:\winnt goto MAIN
del c:\winnt\winnt256.bmp
copy \\domserver\logon_stuff$\winnt256.bmp c:\winnt\winnt256.bmp


:MAIN
echo .
echo ..
echo ...

echo Initializing Log on script for your profile. Please wait ...
net use K: /delete
net use K: \\domserver\common
echo Synchronizing local time settings with server's...

net time \\DOMSERVER /set /yes


[This message has been edited by mourikise (edited 04-18-2001).]