#132036 - 2005-01-07 11:16 AM
Sendkeys on a windows 2000/XP logon screen?
|
Finbom
Fresh Scripter
Registered: 2003-06-27
Posts: 21
|
Hi!
I am trying to write a script that logon a remote computer to the network with a specified username and password.
Does anyone know how to this?
Some kind of send keys that works remotely and on the logonscreen.. 
Regards, Magnus Finbom
|
|
Top
|
|
|
|
#132042 - 2005-01-07 04:49 PM
Re: Sendkeys on a windows 2000/XP logon screen?
|
Co
MM club member
 
Registered: 2000-11-20
Posts: 1342
Loc: NL
|
Something like this....
Code:
$sComp="remote computer"
$domain="your domain"
$user="your useraccount"
$password="your password"
$dom = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultDomainName",$Domain,"REG_SZ")
$usr = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",$User,"REG_SZ")
$pas = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",$Password,"REG_SZ")
$frc = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ForceAutoLogon","1","REG_SZ")
$aut = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","1","REG_SZ")
_________________________
Co
|
|
Top
|
|
|
|
#132048 - 2005-01-10 10:40 AM
Re: Sendkeys on a windows 2000/XP logon screen?
|
Finbom
Fresh Scripter
Registered: 2003-06-27
Posts: 21
|
Hi!
What I want to do is to send a scheduled WakOnLan signal to a selected pc and also send a account id and password that should be used to logon to the network.
I dont want to use the registrykeys for autologon becuse the machine will sometimes need to be used by some other users.
Regards, Magnus Finbom
|
|
Top
|
|
|
|
#132050 - 2005-01-10 11:27 AM
Re: Sendkeys on a windows 2000/XP logon screen?
|
Co
MM club member
 
Registered: 2000-11-20
Posts: 1342
Loc: NL
|
this will disable the autologon....
Code:
$dom = = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultDomainName","","REG_SZ")
$usr = = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName","","REG_SZ")
$frc = = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ForceAutoLogon","0","REG_SZ")
$aut = = WriteValue($sComp+"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","0","REG_SZ")
_________________________
Co
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1046 anonymous users online.
|
|
|