Discussion Locked

Conditional Processing in Login Script

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
In the NT 4.0 help for the IF statement, MS indicates that it is possible in a batch statement to determine whether a user typed a Y or N and use a goto statement to direct the processing to a paragraph based upon the errorlevel generated. However, I don't understand how to implement this in a login script. Can someone explain this more clearly than the documentation, including a short example? Or does someone know of another way to do what I want to do? Thanks.

7 replies

by harryg

Doesn't explain how I can prompt a user to enter Y or N and then use this answer to direct the batch file to a paragraph. That's the information I need. But thanks for the link.

by beermonster

What the nt4 help file is referring to is choice.exe from the reskit, get a copy and run it using choice /? and you'll see the syntax. BTW much to my delight i see that in win2k this has been icorporated into the set command as set /P : )

by nichomach

You may have already been advised of this, but I still reckon the most elegant way of handling login scripts in NT is via Kixtart, available (free, with sample scripts) at http://netnet.net/~swilson/kix/. Allows mapping by groups, registry editing,and I think the sort of thing you're after would be served well by the GET command, which'll get a single character and store it as a variable, or GETS which'll store a string of characters that the user types until they hit "Enter".

This discussion is closed to new replies.