Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows Scripts and Batch Files .: VBScript to create a Auto Login for Windows

VBScript to create a Auto Login for Windows

This script will prompt you for the username and then password with input boxes. Fill them in and you are set. If you need to change the users just run the script again and will change it.

_________________________________________________________________________________________________

'region Script Settings
'<settings><scriptpackager><process>cscript.exe</process>
'<arguments></arguments>
'<extractdir>%TEMP%</extractdir>
'<outputdir>O:\</outputdir>
'<files></files>
'<usedefaulticon>True</usedefaulticon>
'<icon></icon>
'<showinsystray>True</showinsystray>
'<tooltip></tooltip>
'<altcreds>False</altcreds>
'<efs>True</efs>
'<ntfs>True</ntfs>
'<local>False</local>
'<username></username>
'<domain></domain>
'<abortonfail>True</abortonfail>
'<product></product>
'<internalname></internalname>
'<version>1.0.0.1</version>
'<versionstring></versionstring>
'<description></description>
'<comments></comments>
'<company></company>
'</scriptpackager>
'</settings>
'
'endregion

'Windows XP Autologin Script for Multimedia Classrooms
Set ShellObj = WScript.CreateObject("WScript.Shell")
Set FSO = WScript.CreateObject("Scripting.FilesystemObject")
Set NetObj    = WScript.CreateObject("WScript.Network")
WinDir = FSO.GetSpecialFolder(0)
SysDir        = FSO.GetSpecialFolder(1)
On Error Resume Next
WinPass="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"

Dim sUser, sPass
sUser = InputBox("Enter Username to Autologin")
sPass = InputBox("Enter Password")
ShellObj.RegWrite WinPass & "AutoAdminLogon","1","REG_SZ"
ShellObj.RegWrite WinPass & "DefaultPassword", sPass, "REG_SZ"
ShellObj.RegWrite WinPass & "DefaultUserName", sUser,"REG_SZ"

 

WScript.QUIT


How helpful was this article to you?

Related Articles

article Batch file to AutoLog to NT/2000/XP only and disable the Novell Login screen
Configure Auto-Login to NT/2000/XP only and...

(No rating)  5-2-2008    Views: 161   
article How to Create a Baseline using Windows Performance Monitor
The art of using performance monitor is a...

(No rating)  4-21-2008    Views: 198   
article How To Manually Re-create a WINS Database in Windows
SUMMARY This step-by-step guide...

(No rating)  2-18-2008    Views: 162   

User Comments

Add Comment
No comments have been posted.