Solved

How to run program from autoexec.bat on NT?

Posted on 2000-04-12
10
385 Views
Last Modified: 2013-12-28
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
0
Comment
Question by:QuantumSingularity
10 Comments
 
LVL 3

Expert Comment

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

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"ParseAutoexec"="1"

OR put it in:

c:\winnt\system32\autoexec.nt

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

OR:

Put it in:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]

Try them and see which one works for you.

SI
--
0
 

Author Comment

by:QuantumSingularity
Comment Utility
Edited text of question.
0
 
LVL 3

Expert Comment

by:simonprr
Comment Utility
Well that isn't what you first asked is it!!!
0
 
LVL 3

Expert Comment

by:simonprr
Comment Utility
Maybe then this question should be in the programming section....(?)
0
 

Author Comment

by:QuantumSingularity
Comment Utility
simonprr,

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
0
Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

 

Accepted Solution

by:
ccheek earned 50 total points
Comment Utility
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.

0
 
LVL 23

Expert Comment

by:Tim Holman
Comment Utility
Exactly - NT will ask you for a password anyway, so it's 95/98 you should be concentrating on !
0
 
LVL 3

Expert Comment

by:simonprr
Comment Utility
You could use the AutoLogon tool which comes with the NT Resource Kit, which would AutoLogon a specified user.
0
 
LVL 5

Expert Comment

by:carmine
Comment Utility
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.

Mark
0
 

Author Comment

by:QuantumSingularity
Comment Utility
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
0

Featured Post

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now