General discussion


consolidate nt logon script

By steffeno ·
Dear ALL
I am not an expert in writing batch file for logon script in NT 4.

Was wondering if we can consolidate the scripts into one batch file instead of having different batch files.

I mean like if I want to set this group to map this network drive and another group to map to a different network drive in the same batch file. Is that possible? Or do I have to place it in a separate batch file?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by erikdr In reply to consolidate nt logon scri ...

Yes it's possible, though tricky.

The main way to segment in a .BAT file with NT groups is to use the IF command and then IF EXIST. On a logon share, make e.g. files X-CHECK.TXT and Y-CHECK.TXT (dummies), give them NTFS rights so that only group X can see the X-Check file and vice versa. Then with IF EXIST X-CHECK.TXT GOTO in the batch file you've determined that this person is member of group X.

With more advanced scripting languages like Kixtart (on the NT resource kit) you can do the check more directly, but the IF model _does_ work - we relied on it heavily in our NT times...

Hope thiz helpz,

<Erik> - The Netherlandz

Collapse -

by steffeno In reply to consolidate nt logon scri ...

Hi Erik,
Thanks for the tips. I sorta see where you are going with this. Will give it a try when I have more free time.
When you mean can see the file, do you actually mean giving them the read access?


Collapse -

by p.j.hutchison In reply to consolidate nt logon scri ...

Instead of Batch files, using Visual Basic Scripting (.VBS) would be much easier. You need to install Windows Script Host 5.6 on all the machines to enable this.

For VBS programming see

Related Discussions

Related Forums