#40444 - 2003-05-20 01:47 PM
Re: Admin Script
|
AzzerShaw
Seasoned Scripter
  
Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
|
Dude - Im a little confused on what you want but hope this helps ;
This is what If i want a pc to auto logon, it also locks out the keyboard and mouse, so the job cant be stopped half way by an ordinary bod, but the Pc will need to be restarted for the changes to be kicked into place, hope this is the sort of thing you were after !! (Just out of interest I take it you know the Admin password?)
code:
; Kix script to add AutoAdminLogon
Use u: "\\servername\Scripts" /user:DOMAIN1\username /Password:userpassword /persistent:no
Open (1,"u:\DomainAdmin\Administrator.ini") ;holds the admin password $Password=ReadLine(1)
WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword","$Password","REG_SZ") WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName","Administrator","REG_SZ") WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","1","REG_SZ") WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","DontDisplayLastUserName","0","REG_SZ") WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","LegalNoticeCaption","","REG_SZ") WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","LegalNoticeText","","REG_SZ") WriteValue("HKEY_Local_Machine\System\CurrentControlSet\Services\KBDCLASS","Start","4","REG_DWORD") WriteValue("HKEY_Local_Machine\System\CurrentControlSet\Services\MOUCLASS","Start","4","REG_DWORD")
Sleep 5
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 905 anonymous users online.
|
|
|