Sign Up   Sign In

Join the community!
Sign in now with your Facebook account.
ForumsTechnicalThread
Forum
Advanced Search
Filter     |   View Watchlist
[ Print Friendly ] [ Watch Thread ]


Prevent a program from being closed? [ 1 ]
yelnocp
yelnocp
Gnatsies
#1   Posted 2 years ago
    [ Reply ]   [ Quote ]
Hey all.
We need to have our ticket software running 24/7 at my movie theater, and I was wondering if there was some way to prevent (or hinder) it from being closed.
We're using XP, and the program is RTS ticketing, if it matters.

I've done a bit of research, and the only results I could find involved mucking about in the registry, which I would rather not do. the computer isnt mine, I'm probably the only one that could fix things if they went wrong, and I'm just not that familiar with the Registry anyway. Therefore, another program to do this would be my first choice.
Strider165
Strider165
Gunners
FORUM MOD
#2   Posted 2 years ago
    [ Reply ]   [ Quote ]
In reply to yelnocp, #1:

Why do you want to keep it from being closed?
Kull
Kull
Sponsor
#3   Posted 2 years ago
    [ Reply ]   [ Quote ]
You could just have a scheduled task relaunch the program every few minutes, unless that would open a new window instead of changing the focus. Or you could create a script to check if the program is running and relaunch it.
KWierso
KWierso
BEARSHAFT
#4   Posted 2 years ago
    [ Reply ]   [ Quote ]
In reply to Strider165, #2:

I would guess that the computer that runs the software may take a long time to start the program.

Long loading times in a business that needs to get a large number of people through the box office line would be bad for business.
TheSwmnCello
TheSwmnCello
has 360
FORUM MOD
#5   Posted 2 years ago
    [ Reply ]   [ Quote ]
I don't know of any way to actually prevent a program from being closed (think of the security issues that would cause - popups you can't close, etc). But if you just want it to automatically restart every time it's closed, you could write a batch file like this:
@echo off
:start
@rem **Notepad is used here as an example - substitute the executable of your choice**
%SystemRoot%\system32\notepad.exe
goto start

But be forewarned that this is an infinite loop. It's probably not the solution you want, because infinite loops very rarely are. It will keep opening that program every time it's closed, forever and ever. The only way to stop it is to close the command line window it's running from (which, if your program runs full screen like I'm assuming it does, will be very difficult) or turn off the computer.

Also, I just used a goto. I feel dirty now...

Does your software require input from a standard keyboard? If you could use something proprietary - where they can't type Alt+Tab, Ctrl+Alt+Del, and other such key combinations - then that would make your problem far easier to solve.
saber7
saber7
Sponsor
#6   Posted 2 years ago
    [ Reply ]   [ Quote ]
The other probabbly better option than a batch file or script that keeps opening the program would be to run the program as a service. This would allow you to set it up so that if the program ever crashes or somone closes it, windows would open it again instantly. I believe there is a windows utility available out there that will allow you to do this. I would need to know what exactly the application does and why it needs to stay open all the time to know if this would even be possible though, as not all applications run well as a service.
Fhajad is online
Fhajad
4pnt0Jeep
#7   Posted 2 years ago
    [ Reply ]   [ Quote ]
In reply to saber7, #6:

support.microsoft.com/kb/251192
yelnocp
yelnocp
Gnatsies
#8   Posted 2 years ago
    [ Reply ]   [ Quote ]
thank you all, sorry I wasnt available to actually provide feedback and help you help me.
Strider165
Strider165
Gunners
FORUM MOD
#9   Posted 2 years ago
    [ Reply ]   [ Quote ]
In reply to yelnocp, #8:

Does that mean you figured it out?
[ 1 ]