Link to home
Start Free TrialLog in
Avatar of jmharr
jmharr

asked on

making a vb program start up on windows start up.

i want my program to start up when windows starts up, and not let the user do anything thing with windows until the right password is entered. how can i do that?
Avatar of jmharr
jmharr

ASKER

oh also, it needs to disable the ctrl + alt + del keys and alt + tab or any of the other key liek that

I am adding this comment because I want to see the answer and because I can't fully address the question... As for the Password part of your question, jmharr, it sounds like you want to create a dedicated PC that runs only your program.  If this is the case and you are on a fairly new release of Win 95 or better then I would enable the Users option on the system to force a User ID & Password. (You will have a users icon on your control panel if this is so.) Then you could use this API: ... Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long ... to get the UserID from within your program for security purposes.  To start your program automatically upon boot place a shortcut to it in the StartUp folder located within your Program folder... As for the rest of your question, I want to see the answer(s).

jmharr, a commonly overlooked aspect of windows is the win.ini
file.  Windows uses this for load information, adding several strings (i.e.:  run="c:\vb\jhmarr\pass.exe")
this could load your program.  And if the correct password is given to the program then it could allow the remaining loading of windows.
Avatar of jmharr

ASKER

will that start up when windows does, and not load the shell (explorer.exe) until the password is right? I also need to know how to make a form display when ctrl + alt + del is pressed and the same with alt + tab
ASKER CERTIFIED SOLUTION
Avatar of wsanchez
wsanchez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi jmharr,

Lookup RunOnce in the registry. These programs are run BEFORE any other program loads! But when started, you'll have to put it in there again (it gets automatically deleted).
Ctrl-Alt-Del can be trapped. Lookup https://www.experts-exchange.com/topics/comp/lang/visualbasic/Q.10067913.
Alt-Tab can be intercepted by using either form_lostfocus or form_keydown.

Regards, Abel
More advanced is using the "Shell=explorer.exe" from the "[boot]" section of system.ini. Replacing that with your program will prevent explorer.exe to load and additionally it will prevent other apps to load. When your program exits, you should call explorer.exe to get the normal window-behaviour.