Kornel Posted September 3, 2009 Posted September 3, 2009 Someone know where to find a function/program to auto-logon to system, but not every time!Maybe more detales.. I have a script to testing, and 3 computers with win xp/vista/server, and I need to run it on every computer(I use psexec), but there is a problem, because there is no certainty the computers will be ON and logon with some user. I need to use wake on lan(I have that), and remotly make logon in local desktop. Is there any kind program or function to do logon?it must work on different situations(first logon, screen is blocked, the alt+ctrl+delete is needed or not) and systems, just send({tab}) etc. is not enough//sorry for my english XD
Anteaus Posted September 3, 2009 Posted September 3, 2009 (edited) Someone know where to find a function/program to auto-logon to system, but not every time!There is no programmatic way to do logon, this is intentional by design to prevent Trojans stealing passwords. In fact, MS go to considerable lengths to ensure coders cannot bypass the winlogon process, which runs in a separate desktop. Thus, Send() etc. won't work for the logon dialog-box. However, two methods of autlogon exist (assuming XP, Vista/7 much the same though)Run 'Control userpasswords2'Select the account to make automatic, and untick the box 'Users must supply a password...' Or, manually make entries in the Winlogon registry key as per: http://support.microsoft.com/kb/315231Both of these methods operate fulltime or not at all. Though, you can turn autologon off/on before shutdown by modifying the registry values, provided you know of this need in advance. BTW I'm assuming workgroup computers here, if they are in a domain the above methods still apply but need a bit more configuration.If you wish to intercept the logon process after authentication but before the desktop is shown, you can do this by way of hooking the 'shell' pointer in the Winlogon registry key. (Point this to your own program, and make sure this then launches explorer.exe so the desktop is loaded.) Other option I can think of, could you make your script run from the scheduler, under user credentials? This might remove the need for interactive logon. Edited September 3, 2009 by Anteaus
spudw2k Posted September 3, 2009 Posted September 3, 2009 I use this at work (compiled). At shutdown I execute with the "on" param. At Login I run without param to remove autologin from registry. $regkey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" If StringInstr($cmdlineraw,"on") Then RegWrite($regkey,"AutoAdminlogon","REG_SZ","1") RegWrite($regkey,"DefaultUserName","REG_SZ","admin") RegWrite($regkey,"DefaultPassword","REG_SZ","P@ssword1") Else RegWrite($regkey,"AutoAdminlogon","REG_SZ","0") RegWrite($regkey,"DefaultUserName","REG_SZ","") RegWrite($regkey,"DefaultPassword","REG_SZ","") EndIf Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now