I have a batch file running when users log in NT clients. Problem is, how to
not let them close the dos window that is running the bat file? Thanks a
zillion...........
"Sani" <kam...@tp.edu.sg> wrote in message
news:38570...@news-svr.tp.ac.sg...
: Hi again....
:
:
There is no completely satisfactory solution to this problem that I'm
aware of. One thing that I do is to run the logon script minimized. A
user is less likely to close a minimized script than a windowed
script. To implement this, make the following lines the first six
lines of your script.
@echo off
if exist %temp%\#logon#.cmd goto begin
echo f|xcopy/h %~fs0 %temp%\#logon#.cmd > nul
echo del %temp%\#logon#.cmd >> %temp%\#logon#.cmd
start/min cmd /c%temp%\#logon#.cmd %* & exit
:begin
What the above lines will do is have the logon script copy itself to
another batch file named %temp%\#logon#.cmd. The logon script will
then start %temp%\#logon#.cmd minimized and quit. Since
%temp%\#logon#.cmd is a carbon copy of the logon script, it will do
all of the things that the logon script would have done. After it
finishes running, it will delete itself.
Another alternative is to throw up a screen saver while the logon
script is running. While the user is dealing with that irritation, the
logon script will probably be finished. To do this insert the
following line at the top of the script.
start %systemroot%\system32\ssmaze.scr /s
Add this REG_DWORD key:
HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\RunLogonScriptSync
Values are :
0 - don't wait for script to finish before loading desktop
1 - wait for script to finish
On Thu, 16 Dec 1999 08:45:15 +0800, "Sani" <kam...@tp.edu.sg> wrote:
>
>Hi again....
>
>I have a batch file running when users log in NT clients. Problem is, how to
>not let them close the dos window that is running the bat file? Thanks a
>zillion...........
>
>
>
TIA,
Ronin
=======================================================================
For email please remove _dont_bother_me_ from the start of the address.
=======================================================================
I do this using Kixtart (KIX32), a MS tool.
I use the SETCONSOLE(HIDE) statement. The console window will be completely
hidden from the user.
Kixtart can do a lot for you in logon scripts too. Find out!