Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

running NT login script minimized

7 views
Skip to first unread message

Mason Verger

unread,
May 22, 2002, 8:17:25 PM5/22/02
to
What is the best way to run an NT login script minimized?

Can I enter the following as the login script in User Manager:

start /min login.cmd

where login.cmd is the script?

MV


Clay Calvert

unread,
May 22, 2002, 9:21:24 PM5/22/02
to

I don't think the above works, but I can't test it right now.

Here is a hack that may work for you. In the first line of the login
script use this:

%1 start /min "Login Script" %0 REM & goto:eof

I tested the above using regular batch files, but it should work for
login scripts.

The %1 will be blank the first time through, but not on the second
pass when it will actually be REM and then cause the rest of the line
to be ignored.

The "Login Script" is to work around a "feature" of the Start command.
Start will use the first quoted string as the Title of the command
prompt. So in case the login script is passed quotated (maybe in the
case of spaces in the name) then you are covered. You may not
encounter this problem, but it can be handy to put specific
information in the Title of the command prompt, such as "Don't Touch!"
: )

The %0 calls the script again, at least it should. If not let us
know.

The REM we've already discussed and the "& goto:eof" will cause the
script to end after the first line on the first pass.

HTH

Clay Calvert
Replace "W" with "L" in email.

Ri...@mckinney.vg

unread,
May 23, 2002, 6:24:59 AM5/23/02
to
Hi,

What you need to do is 'chain' 2 scripts.

UserManager calls script1.cmd

::Begin Script1.cmd
start /MIN script2.cmd
::End Script1.cmd

********************
::Begin Script2.cmd
....
.....
.......

Dave Pink

unread,
May 23, 2002, 10:56:09 AM5/23/02
to
To cause a batch file to run minimized, I use a code snippet similar
to what Clay posted:

IF NOT DEFINED ME Set ME=1&Start "ME" /MIN %0&Goto :EOF

Like Clay's code this must also be the first line of the (batch file)
login script. It also requires that "EXIT" must be the last line of
the batch file.

This works for me on both NT4 and Win2K machines.

(Note that the variable %ME% doesn't have to be ME, it can be anything
of your choosing.)

HTH.

Dave


On Wed, 22 May 2002 20:17:25 -0400, "Mason Verger"
<ma...@dontbeaspammer.com> wrote:

Rick Campbell

unread,
May 24, 2002, 1:02:26 AM5/24/02
to
try using the following:

ver | find /i "Windows 2000" & if errorlevel 0 set OS_VER="Win2k"
ver | find /i "Windows XP" & if errorlevel 0 set OS_VER="WinXP"

There is also a tool called OSVER that will report the version of the OS. I
can email this to you if you like.

Rick Campbell
Senior Systems Administrator
Spacelabs Medical

"Mason Verger" <ma...@dontbeaspammer.com> wrote in message
news:achcgr$2b7h$1...@news3.infoave.net...

Rick Campbell

unread,
May 24, 2002, 1:07:08 AM5/24/02
to
WHOOPS. Posted to wrong thread. Sorry everyone...

"Rick Campbell" <rickca@.AT.speakeasy.net> wrote in message
news:ueribb2...@corp.supernews.com...

0 new messages