Click here to Skip to main content
15,884,962 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Greetings!

After system restart I want the system to login automatically to an account *one time only*, and then start a process.

The commands are issued from a process running with normal privileges.

The system restart is done with shutdown /r /t 0

To start a process I would use SchTasks /CREATE /SC ONIDLE...
I would issue this before shutdown.

However, I have no idea how to autologin after restart *one time only*

Any hints?

Thanks
Wolf
Posted
Comments
Sergey Alexandrovich Kryukov 24-May-15 11:48am    
This sounds like a pretty good technology abuse...
—SA
Frankie-C 24-May-15 12:11pm    
No Sergey, sometimes a pc is used as a public terminal and need to start-up and run an application automatically.
If you follow the second link I provided the user describe a typical use in a public library.
In this case maybe it is a little bit uncommon...
Sergey Alexandrovich Kryukov 24-May-15 12:14pm    
Good point. But I don't think this is the case, as the inquirer wants one-time procedure. Anyway, I added some advice.
—SA
Frankie-C 24-May-15 12:16pm    
Yes This case can sound a little bit strange... I amended the comment.
Thanks for the 5.

A solution could be the use of scripts, or programs, to change registry values for autologon.
You can set how many times the computer have to auto logon setting the entry AutoLogonCount under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. This value should be decremented each boot, when reaches 0 will remove all autologon entries (username and password) from registry.
Anyway as per every window thing there are a lot of variations, bugs or not, and whatever you want call them ... :)
So happen that under WinXP many of the entries are DWORDS, but under Win7 and, presumably, newer versions it ia a string...
Make usual research (try and fix)...
Some interesting links:
1. http://superuser.com/questions/340396/how-do-i-change-automatic-logon-via-script-or-command-line[^]
2. https://social.technet.microsoft.com/Forums/windows/en-US/b2e213fe-ce33-4712-8a8d-3cc09722c551/windows-7-autologon?forum=w7itproinstall[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 24-May-15 12:14pm    
5ed.
—SA
Please see this Autologon Sysinternals utility: https://technet.microsoft.com/en-us/sysinternals/bb963905[^].

Windows Sysinternals Suite is a must-have suite of utilities, useful for all developers and system administrators:
https://technet.microsoft.com/en-us/sysinternals/bb842062[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900