I'm teaching myself to write a batch file that will write a .REG file based off user's input. Our domain computers have corporate gp's that force a lock screen, but I want a kiosk that will automatically log a user on and will not go to sleep or display a lock screen.
I know the .REG keys to add/modify, but I would like to run a .BAT file that will ask for the domain, user, and password, write that to a temp file and then use REGEDIT to run that file. I then would like to remove that temp file after it is successfully passed through.
Should I use a user's temp folder in their profile or use the temp folder on C:\? And will they auto delete at some point? Or do I need to remove the file after it completes manually?
My research says no, not until a disk cleanup is ran for the second question, but verification would be appreciated, or any suggestions.
Thanks in advance
I'm well aware of the consequences of modifying the registry. I have backups of my test environment.
Create a file in the %temp% folder and remove it after using regedit.