hi!
I have coded a Login Application in VB6.0. I want it to load first when Windows Xp Professional starts. How can it be done...

Dani AI

Generated

Since clarified you want the VB6 login program to appear right after the secure logon (Ctrl+Alt+Del) and before other user-startup apps, timing matters. was correct to ask when — there are different hooks depending on how early you need the program to run.

The most reliable way to start something before the normal Run/Startup items is to add it to the Winlogon Userinit list. Winlogon launches the executables listed in
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit; those entries are started as part of logon and userinit then starts the shell (Explorer). This places your program earlier in the sequence than normal Run keys. (apprize.best)

Example (.reg) — keep the real userinit.exe entry and append your EXE (adjust the path):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Userinit"="C:\\Windows\\system32\\userinit.exe,C:\\Program Files\\MyApp\\MyApp.exe,"

Important: export the Winlogon key first (File → Export) so you can restore it. Editing Winlogon/Userinit is powerful but dangerous — a bad value can produce a black desktop or prevent logon; many anti-malware tools monitor/deny changes here. (learn.microsoft.com)

If you prefer safer alternatives: use a system service for pre-logon work (no guaranteed interactive UI), or place the app in Run/RunOnce registry keys for per-user or per-machine startup — note that Run/RunOnce execution ordering among entries is not strictly guaranteed. Use Autoruns from Sysinternals to inspect what runs and when while you test. (learn.microsoft.com)

Always test on a nonproduction machine, keep a registry backup, and be prepared to boot to Safe Mode or use a recovery disc to restore the Winlogon values if something goes wrong.

Recommended Answers

All 2 Replies

There are a lot of ways to do this. When are you wanting to do it? before login? After login? After the desktop appears?

Here are some links to check out:

Here's one describing exactly what happens at login:

Also, you can drop a Shortcut of the program into the StartUp folder in the Start menu. If you put it in the All Users' Start Menu, it will be there when everyone logs on.

thanks for ur quick response. Can u please be specific to tell me how can i load my application after Login (i.e. ctrl+alt+del ). i wan to load it before other applications.

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.