Search code examples
windowsshellbatch-filewinlogon

How to run different winlogon shell for different user in windows?


on Windows winlogon shell i specified to run a start.bat file which starts a program, now i want to run on windows logon specific programs for specific user. for example, for user1 when windows starts it runs program1. for user2 when windows starts it runs program2. how can i do this ? if write on .bat how to know which user logined?


Solution

    1. You can use the username variable: %USERNAME% for finding the name of the user currently logged in.
    2. Modify the start.bat file, use if-else conditionals for running programs based on username.
    3. Run start.bat at logon.