Enforce Startup

I have apps that launch at startup from the registry. I have methods to prevent users from exiting once the app starts. But users can still press ctrl-alt-del and end the task before the app comletely starts while win95 is booting. Screen saver mode dosn't work. Registering as service dosn't work. How can I force users into my app at startup?
LVL 1
Neal HartmanAsked:
Who is Participating?
 
mark2150Connect With a Mentor Commented:
So anyway, theres your answer. As I said, there is NO WAY to completely guarentee your app runs, nor should there be. If you could lock it down then you can't *EVER* change out that program.

M

0
 
cognitionCommented:
The old way under windows 3.1 etc was to set the shell= in the system ini. There is a similar entry in the registry. Try using that.
0
 
mark2150Commented:
No matter what you try there's always going to be a narrow sliver of time where your app can be killed or prevented from running. This is *necessary* for if this didn't exist you'ld have to reformat the disk if your app ever had a bug!

There is no way to absolutely, positively, no matter what, guarentee that *YOUR* app will fire on startup. If there were, how would you *STOP* it? You'ld have to reformat the drive (or maybe hit it with a hammer). *NOT* a good idea!

M

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
cognitionCommented:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

The above key has a shell entry. I have never tried altering it, but it may do the job.

You can also put code in all the queryunload events.


0
 
cognitionCommented:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

The above key has a shell entry. I have never tried altering it, but it may do the job.

You can also put code in all the queryunload events.


0
 
cognitionCommented:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

The above key has a shell entry. I have never tried altering it, but it may do the job.

You can also put code in all the queryunload events.


0
 
cognitionCommented:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

The above key has a shell entry. I have never tried altering it, but it may do the job.

You can also put code in all the queryunload events.


0
 
cognitionCommented:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

The above key has a shell entry. I have never tried altering it, but it may do the job.

You can also put code in all the queryunload events.


0
 
mark2150Commented:
Jeeze Cognition, we heard you the first time! <G>

BTW, the queryunload will only prevent his app from shutting down, if they interrupt the system before it's launched...

M

0
 
cognitionCommented:
Oops. We are having a little problem here. I can't work out if my internet connection is funny because of MS Proxy server, or if its the ISP. I wanted to upgrade to version 2, but the MSDN cd has gone for a walk.

I tried my propsed solution, and it works very well. I used taskmgr.exe. The only problem is, you end up without a desktop, and it also bypasses the startup folder and run entry in the registry. Very entertaining if you want to freak someone out. A bit like the blue screen of death screensaver!

0
 
mark2150Commented:
Yeah, you can diddle with the Policy Editor to lock the workstation down. Then you set the BIOS to prevent floppy boot and password the BIOS so they can't change it back - god help you if you ever need to update the system!

Actually tho, a user could still press <F8> and single step the bootup. I've never met a standalone system that I couldn't hack into given time and tools.

M

0
 
Neal HartmanAuthor Commented:
F8 can be disabled in the msdos.sys file.

0
 
mark2150Commented:
Ok, so we:

1) Diddle the MSDOS.SYS file to block <F8>
2) Tweak the BIOS to prevent floppy boot
3) Force the registry with POLEDIT to prevent access to DOS prompt and to turn off RUN option, etc.
4) Change Cognitions registry key
5) Put preventative code in the Query_Unload event.
6) You'll also need ON ERROR RESUME NEXT at the global level to prevent a runtime fault.
7) The BIOS also needs to be smart enough to ignore errors at bootup to prevent the user from forcing a keyboard error.
8) You need to password the BIOS so the settings can't be compromised.
9) The system must not log into a LAN where the administrator can do nasty things to you while logging in.
10) You can't install PCAnywhere or remote control software or ICQ for remote access.

*THEN* you might be able to insure that your app gets control most of the time.

M


0
 
cognitionCommented:
Just write your own Operating System. It has to be less buggy than any of MS's offerings!
0
 
mark2150Commented:
Actually that's not *that* hard to do. You simply take a copy of COMMAND.COM and edit the internal command table to eliminate the commands you don't want the users to execute. Put a SHELL= statement in the start of CONFIG.SYS so it executes *YOUR* version of COMMAND.COM instead of the normal one and let it fly! ;-)

As an aside, we once wrote a critical error interceptor for DOS that was a TSR that would force our app to restart if (somehow) they managed to crap it out. Well, to make a long story short we lost a month of development time to a *teeny* bug that we solved in 10 minutes - once we *saw* the error message that our "critical error" handler was consuming! (sigh)

HEY! Here's an *IDEA*. Rename your application EXPLORER.EXE. The OS restarts that one automatically!

M

0
 
Neal HartmanAuthor Commented:
No matter which method of loading the app you suggest the user can still End Task before  it finished loading. The only possiblity so far is from mark2150 to rename My App to exporer.exe. My App then becomes the desktop. The user can still End the task but gets an unusable blank desktop. Only problem is exiting My App. I can exit to the renamed explorer.exe OK but still have a blank desktop.
0
 
mark2150Commented:
Thanx for the points.

Think about it, if your app replaced the desktop then there's nothing to exit *to*. If you allow the desktop to exist then there is the possibility that the desktop won't decide to run your app.

BTW, just what are you trying to do? any way you could run that app as DOS thread. I mean, if it's that critical that *your* app run, then it sounds like the box is doing a dedicated task. Since DOS is a single threaded task it sounds like it would be a good match.

M

0
 
Neal HartmanAuthor Commented:
Its a single purpose laptop w/o a floppy drive. Need win95 for vb and other win apps. Laptop is used by electricians (low computer skills) around the country to interface with locomotives. Keeping them away from desktop cuts down on support calls when the try to "fix" things.

Rich

0
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.