Logon script multiple users

January 30, 2012 at 06:06:23
Specs: Windows 7

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:
etc. etc.

How can i script this to one line instead of mulitple lines ?

Kind Regards!

See More: Logon script multiple users

Report •

January 30, 2012 at 11:07:26
Can you post your full script?


Report •

January 31, 2012 at 04:41:10
Hi Tony!

It's a simple script:

if /i %USERNAME:~5,5%==name1 goto 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 :)

Report •

January 31, 2012 at 05:22:00
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 To Ask Questions The Smart Way

Report •
Related Solutions

Ask Question