2008年12月12日星期五

把电脑加入域后,设置自动登陆

保存为: 自动登陆.vbs

On Error Resume Next
Dim zesoUser,zesoPassword,zesoChange
zesoChange = MsgBox ("选择Y开始设置自动登陆,N取消自动登陆",vbYesNo,"系统自动登陆器.eddie")
If zesoChange = vbYes Then
zesoUser = InputBox (" 网盟专用","系统自动登陆器.eddie","请在这里输入您要自动登陆的用户名")
zesoPassword = InputBox (" 网盟专用","系统自动登陆器.eddie","请在这里输入您要自动登陆的用户密码")
Set WshShell = wscript.CreateObject ("wscript.shell")
WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Defaultpassword", zesoPassword ,"REG_SZ"
WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Autoadminlogon", 1 ,"REG_SZ"
WshShell.RegWrite "HKLM\Software\Microsoft\Windows

0 评论: