Hi! We are using a simple logon script for example:
if /i %USERNAME:~4,5%==name1 goto name1
Now we need to re-program this to user multiple users.
For example:
User_Name1
User_Name2
User_Name3
User_Name4
etc. etc.How can i script this to one line instead of mulitple lines ?
Kind Regards!
Kevin
Hi Tony! It's a simple script:
if /i %USERNAME:~5,5%==name1 goto name1
:Name1
(Start some programs)I can solve this by creating different lines of al 50 accounts, like:
if /i %USERNAME:~5,5%==name1 goto name1
if /i %USERNAME:~5,5%==name2 goto name1
if /i %USERNAME:~5,5%==name3 goto name1
if /i %USERNAME:~5,5%==name4 goto name1
if /i %USERNAME:~5,5%==name5 goto name1
etc. etc.But i think it can be solved by changing some code of the original code :)
Q: Why even bother in the first place? A logon script will either have general configuration stuff, so the name of the user doesn't matter; or it'll have specific settings for the specific user, in which case it should be tied to the specific account and not in the general logon script.
| « How Can I Dump a Text Fil... | Filter Xcopy containing t... » |