How to run program from autoexec.bat on NT?

I'm writing a VB6 program for Win95/98/NT (I do not have NT on my system) which will ask for a password during boot.  The object being to prevent NT from continuing to load unless the correct password is entered.

With Win95/98 I simply append my exe to the Autoexec.bat file and everything works fine.

WinNT on the other hand ignores exe files in its Autoexec.bat file.

What I need to know is how to accomplish this on WinNT and if possible a clear code example.

Thanks, QS
Who is Participating?

Improve company productivity with a Business Account.Sign Up

ccheekConnect With a Mentor Commented:
Im a bit amussed, NT will NOT allow you in unless you have entered a correct user name/password anyway (client&server)

Or are you wanting to have this program in you autoexec only ???

if so, that would pose a bad security problem...remember the autoexec can be skipped on ALL the systems you listed.

Hmmm...think you should revise the question or drop the project.

Try using this registry file. Use notepad and save it as autoexec.reg for example:


[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]

OR put it in:


Which is similar to autoexec.bat in Win95/98.


Put it in:



Try them and see which one works for you.

QuantumSingularityAuthor Commented:
Edited text of question.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Well that isn't what you first asked is it!!!
Maybe then this question should be in the programming section....(?)
QuantumSingularityAuthor Commented:

Sorry for being unclear the first time.

As far as section is concerned, your guess is as good as mine.  I'll try programming next if I receive no more responses here.

Thanks for your time, QS
Tim HolmanCommented:
Exactly - NT will ask you for a password anyway, so it's 95/98 you should be concentrating on !
You could use the AutoLogon tool which comes with the NT Resource Kit, which would AutoLogon a specified user.
A possible solution would be to rewrite as a device driver/system service.   Though these can write to the 'blue screen' at boot time, I'm not sure they can accept keyboard input.

This app really isn't required on NT, but if you don't even want the machine to boot, set a BIOS boot-up password.

QuantumSingularityAuthor Commented:
My question asked how to perform a particular task on an OS with which I was unfamiliar.  Among the acceptable answers was that it was a duplication of functionality already present and so unnecessary.  ccheek pointed this out.  Thanks to all for your time and consideration.  QS
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.