For automated jobs which run at night and need several restarts, you have instructed Windows to automatically login when the system starts up. But you wish to limit automatic logins to the required number.

A registry entry achieves this. First login to the system as Administrator and open the registry editor: In XP, select 'Start I Run', in the following dialog type 'Regedit' and press enter. In Vista you type the command directly in the search field of the Start Menu. After the confirmation, you authorize the execution of the command with 'Continue'.

Navigate to the key

'HKEY_LOCAL_ MAC H I N E\SO FTWAR E\Microsoft\ WindowsNT\CurrentVersion\Win logon'. Create an entry called 'AutoLogonCount' by navigating to 'Edit I New I DWORDValue' or 'DWORDValue (32 Bit)' and open it. In the following dialog, activate 'Decimal' under 'Base' and specify a number under 'Value Data' for the maximum permissible number of automatic logons. Click on 'OK' and close the editor.

During each of the ensuing logons Windows reduces the value entered in 'AutoLogonCount' by one. As soon as Windows comes upon a '0' in 'AutoLogonCount' during system start, it denies the automatic logon, sets the value of 'AutoAdminLogon' to '0' in the above named registry and also deletes 'DefaultPassword'. Advantage of the method: Unknown people cannot easily logon to the system.