Jump to content

Windows Logon with AutoIt v3


sc001
 Share

Recommended Posts

Hi,

i receive login information for a windows network via UDP and want to login via a AutoIT v3 script. Is this possibly? Was thinking about a way to do this since a few hours but I didn't found a good solution.

Would it be possibly to auto-insert UDP received information (after some checks, of course :P ) to the windows logon window using AutoIt v3? This would be a solution for me.

regards

sc001

Link to comment
Share on other sites

Hi,

i receive login information for a windows network via UDP and want to login via a AutoIT v3 script. Is this possibly? Was thinking about a way to do this since a few hours but I didn't found a good solution.

Would it be possibly to auto-insert UDP received information (after some checks, of course :P ) to the windows logon window using AutoIt v3? This would be a solution for me.

regards

sc001

Windows Logon process is executed outside of generally available API.

You cannot script it or it would be a major security risk for Windows OS - this is how it is designed.

Only after the logon process any scripting interfaces, environment and logged user profile becomes available and before the logon - those don't exist so you can't program it with AutoIt

Link to comment
Share on other sites

However.

You can trick it...

This is how I'd do it.

1) I would create a Windows Service that would listen for incoming UDP data.

Services start up even before anyone is logged into the system so your service will be constantly up and running waiting for data.

When data is received I would change the registry to allow AutoLogon with the user and password.

Check the web - you will be able to find the right key for User/Password and enabling Automatic logon.

I would execute either a logoff or a restart of the system and let it automatically logon the user based on the registry information.

Dirty, but this should work.

Edited by sstouk
Link to comment
Share on other sites

@all

Using AU3 as a logon script is definitely possible without to many hassle.

I've seen some threads around this topic. So if you would search on Logon script, you can find some of them.

I wouldn't know why this should not be possible.

I haven't used it yet myself but I use KIX and this is very simular to AU3.

I register the KIX as a service to run using a admin account on the server, put the EXE interpreter in the logon path and voila ...

For more info go the : KIX scripting

But I shoudn't promote other scripting language here I think :">

Regards,

ptrex

Link to comment
Share on other sites

You can change user programmatically by writing DefaultUser, DefaultPassword, AutoAdminLogon, and ForceAutoLogon values to the Winlogon registry key. Then, on issuing a Shutdown(0) the present user will be logged-off and the new one logged-on. Ideally you should then remove the DefaultPassword as it's human-readable.

A variant, handy for networks with restricted users, is to first use a NET LOCALGROUP command to add the current user to the Administrators group, then do the above. This gives you a quick and easy way to gain temporary Admin status. Reversing the process turns the user back into a miserable serf once more.

As for writing to the winlogon session itself, I would be interested to see code which does that - IMHO it's going to be far from easy, as the winlogon process runs in a separate desktop, the purpose of which is to stop other programs interacting with it.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...