Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loggin automatically

Status
Not open for further replies.

md110user

Technical User
Nov 24, 2002
76
SA
Hi
How could I loggin to Win2K server whithout need for "CTR +Alt+Del" and typing the Username and Password?

I need to loggin automatically as an Administrator, like what I can do in Win2Proff.
so if the server which is in my case "stand alon" restatred it can be returne back to the desktop and the programme will be lanch automatically "the programe will start if the windows started (start up programme)".

Thanks in advance
MD110User
 
To bypass the login screen and automatically login in as the administrator, you need to run regedit and make the following resistry mods:

Find key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Ensure the following properties are set (adding them if necessary)

AutoAdminLogon = 1
DefaultDomainName = "{your domain}"
DefaultPassword = "{admin pass}"


SD
 
Download TweakUI, which is a Microsoft Powertoy. It's free, and lets you customize your desktop in many different ways.
It has automatic login ability.

-David
2006 Microsoft Valueable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
As this creates a huge security risk, I would advice that if you must do it that you shoud have a login script configured for the autologin ID that locks the screen right away.

Code:
Set WshShell = CreateObject("wscript.Shell")
WshShell.Run("rundll32.exe user32.dll, LockWorkstation")

I hope you find this post helpful.

Regards,

Mark
 
i am such a script adict.

Here is a total solution for this:
Code:
'==========================================================================
'
' NAME: AutoLoginConfig.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.TheSpidersParlor.com[/URL]
' COPYWRITE (c) 2005 All Rights Reserved
' DATE  : 2/18/2006
'
' COMMENT: Configures AutoLogin and allows screen lock.  
' USAGE:   Login as the ID to be set for auto login and execute this script.
'
'==========================================================================

on error resume next
Dim WshNetwork, strDomainName, path
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WSHShell = Wscript.CreateObject("WScript.Shell")
path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"
strDomainName = WshNetwork.UserDomain
strUserName = WshNetwork.UserName
AdminPassword = InputBox("Enter Admin Password","Password?")
WSHShell.RegWrite path & "AutoAdminLogon","1","REG_DWORD"
WSHShell.RegWrite path & "DefaultUserName",strUsername,"REG_SZ"
WSHShell.RegWrite path & "DefaultDomainName",strDomain,"REG_SZ"
WSHShell.RegWrite path & "DefaultPassword",AdminPassword,"REG_SZ"

If Msgbox("Do you wish to lock the screen after startup?", vbYesNo, "Security Risk!") = vbYes Then
	Set fso = CreateObject("Scripting.FileSystemObject")
	strStartup = WSHShell.SpecialFolders("Startup")
	Set ts = fso.CreateTextFile(strStartup & "\lock.txt", ForWriting)
		ScriptCode = "Set WSHShell = Wscript.CreateObject("& Chr(34) & "WScript.Shell" & Chr(34) & ")" & vbCrLf
		ScriptCode = ScriptCode & "WSHShell.Run("& Chr(34) & "rundll32.exe user32.dll, LockWorkstation" & Chr(34) & ")"
	ts.write ScriptCode
	ts.close
	WScript.Sleep 1000
	fso.MoveFile (strStartup & "\lock.txt"),(strStartup & "\lock.vbs")
End If



If err then
	msgbox "Error Encountered"
Else
	msgbox "Auto Login Configured Successfully"
End if

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top