As stated on the title above,

I'm creating a login system using php and mysql. Ok, I'm wondering if it is possible that I can utilize it as window login system .. That means.. window Login system using web application. Which also means, When I first boot up and before people can access the desktop.. first thing first ... and web browser will pop out with a login page...
is this possible?

p/s: I know this is nothing to do with php question ... but maybe you guys have any idea.. other than uisng java desktop application ... Thanks :)

Dani AI

Generated

Short answer: you cannot replace the Windows logon with a remote PHP page alone. The logon process runs in the OS before a normal user session or browser is available, so you need a native component that talks to Windows’ authentication subsystem. was right that the work must run locally, and ’s startup-browser idea only gives the appearance of protection — it does not control Windows session creation.

If you want a true pre-desktop web-style login, the supported route on modern Windows is a native Credential Provider (Vista and later). Typical architecture:

  • build a Credential Provider (native C++ COM DLL implementing ICredentialProvider / ICredentialProviderCredential),
  • present a minimal UI or embed a browser control (WebView2 if you require HTML UI — embedding can be tricky at the logon desktop),
  • POST submitted credentials over HTTPS to your server for validation (or authenticate directly against AD/LDAP),
  • if validated, create a Windows logon token (LogonUser/LsaLogonUser) and let Windows create the session.

Example skeleton note:

class MyCredentialProvider : public ICredentialProvider { /* implement required COM methods */ }
// After server validation: LogonUser(username, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hToken);

Practical alternatives: use Assigned Access / kiosk mode or a shell-replacement that auto-logins to a locked-down account and runs your browser login — much simpler but weaker security. Key cautions: never send credentials in plaintext, use TLS and server-side rate limiting, test on VMs, and expect network/pre-logon constraints (network may not be available or WebView components may not work in the secure desktop). If you proceed, read Microsoft’s Credential Provider guidance and test thoroughly; this is powerful but nontrivial and has real security implications.

Recommended Answers

All 2 Replies

Yes, you can replace the windows login with something else, but AFAIK it has to be a desktop application. Problem with the webbrowser is that that login code is running on the server, and not on your local machine. It can't interact with the login service of your machine.

Member Avatar for Member #120589

You can certainly NOT set a Windows password (no protection), and set a macro to run on startup to open a browser window with a certain address. I can't see how you can force the browser to hijack your system though - i.e. lock you out.

php has a little malformed brother called gtk (php-gtk). This should run in the OS. I could never get it to work properly. I think by-passing MS's security would be a mistake though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.