So, I'm having an issue where I am trying to automate the process of setting up autoadminlogon in the registry for normal users using a Batch Script. My current issue is that I'm trying to make this process more streamlined by having the script either use the files name which would be the same as the username, or for it to use %USERNAME%. But every time I run the Batch Script in Administrator and use %USERNAME% it spits out the admin accounts username, and not the current users.
This is what the Script looks like
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d Test
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d Test
I'm doing roughly 30+ computers, so not having to either manually add all of the registry values, or having to create X amount of different Scripts would be preferred.