C# How to disable interactive login for a local user account. Similar to Network Service account

active-directorycgroup-policySecuritywindows

I've created a special user account for my applications use, and I need to know how to disable the interactive login feature so that it's only available as a system account. Right now any machine I deploy this application on, the user shows up in the login menu. Any help is appreciated. Is it a setting on the account or a GPO?

Best Answer

Do you actually want to disable interactive login, or just hide it from the Welcome screen? Assuming you're talking about the latter (just disabling interactive login still won't remove from the welcome screen). That's a registry setting under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList (create the key if it doesn't exist). Create a DWORD value named with the username you want to hide, set value to 0. Now that user is hidden from the Welcome screen.