1226
General Software Discussion / Re: Help with Windows batch script
« Last post by Ath on May 06, 2015, 03:18 AM »You might want to create a %server%-validusers.txt file, by making these subtle changes:
and
and having 3 files APPLE-validusers.txt, BANANA-validusers.txt and CHERRY-validusers.txt in the current directory.
You could make it even more fancy by adding a check for common users in validusers.txt, but that seems like a little overkill to me.
Code: Text [Select]
- ...
- SET userlist=validusers.txt
- ...
Code: Text [Select]
- ...
- :Logoff
- findstr /I ^%1$ .\%5-%userlist% >NUL
- ...
and having 3 files APPLE-validusers.txt, BANANA-validusers.txt and CHERRY-validusers.txt in the current directory.
You could make it even more fancy by adding a check for common users in validusers.txt, but that seems like a little overkill to me.

Recent Posts






