Solved

Windows XP Monitor App for Crash? Reopen if so

Posted on 2010-08-30
11
371 Views
Last Modified: 2012-08-14
I've got a commercial application that occasionally crashes.  Doesn't hang, but flat out crashes.  Does XP Pro have any ways to restart the application if it detects the crash?  If not, is there an accepted Windows way to do this?
0
Comment
Question by:ecuguru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 6

Expert Comment

by:rnicolaus
ID: 33564299
Run the app as a service, and set the properties of the service (control panel, administrative tools, services)  right clikc the service, click properties, select the recovery tab, and set all the actions "restart the service"  

let me know if you need to know how to run the app as a service
0
 
LVL 18

Expert Comment

by:web_tracker
ID: 33564908
You can set the application to run at startup. (as soon as windows boots the application will start)
0
 
LVL 3

Expert Comment

by:net_tech_mike
ID: 33566804
It sounds to me that your running out of usable memory, and that the app you are using processes alot of memory allocations to run. I would tweak xp and stop any services that are not required to run automatically. Sometimes this also can be your antivirus program running a daily scan, while your running your app, which takes up alot of memory. possibly change the antivirus daily settings to run a scan after work hours. You may consider a memory upgrade also.

Cheers
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ecuguru
ID: 33567068
rnicolaus : 08/30/2010 - 11:51PM EST

Yes - I need help to run it as a service. Thanks!
0
 
LVL 6

Expert Comment

by:rnicolaus
ID: 33567936
How to run an application as a service:

Open an MS-DOS command prompt (Start | Run | "cmd.exe"), and type the following command:

(Note: Space between binpath= and "C:\ has to be there.)

  c:\windows\system32\sc.exe create "Service Name" binPath= "C:\Your Program.exe"

or simply
  sc.exe create "Service Name" binPath= "C:\Your Path\And Program.exe"

0
 

Author Comment

by:ecuguru
ID: 33568953
Thanks Micolaus..  Will this auto-start the application/service on startup as well then?
0
 

Author Comment

by:ecuguru
ID: 33569432
The service was created ok via the dos prompt per your instructions, but when I goto run the application I get:

Could not start the AppService service on Local Computer.
Error 1053:  The service did not respond to the start or control request in a timely fashion

If it's not going to work through this approach, is there a third party application I can use to keep the apps running?
0
 
LVL 6

Expert Comment

by:rnicolaus
ID: 33569549
A third party app won't do anything different - we need to figure out why it's stopping in the first place.
Is there another error in the event log that you can share?  

What version of .NET is installed?  Perhaps Microsoft.NET Framework 1.1 Service Pack 1will help:

http://support.microsoft.com/kb/885055/
0
 

Author Comment

by:ecuguru
ID: 33569915
Recreated the error.

I was able to try it to call it using a batch file and I got the same error.  To fix, I put a cd command before calling the application to be in the local directory, and it worked.   Before opening the app, is it possible to tell it to change directory to the apps directory before execution (C:\app)?

If the service calls the batch file I made, when the app dies, can it detect it?  Cause I don't know if the batch file will stay up as far as its concerned.

thanks!!!
0
 
LVL 6

Accepted Solution

by:
rnicolaus earned 500 total points
ID: 33570069
OK you will need to modify the registry - and add an application path.

Put SRVINSTW.EXE and SRVANY.EXE that come with the windows NT / 2000 / XP resource kit into your Windows\System32 directory

run SRVINSTW.EXE
Select Install as a service, Local Machine
Give your service any name you desire

When prompted for the path to the service, give the path to SRVANY.EXE in your system32 directory
Select Service is its own process

Set the login credentials. On Windows, System account is the super-root: it’s the highest user in the chain, even higher than Administrator.

Run regedit.exe
Go to
HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\<your service name>
(the name you picked  above)

Add a key = ”Parameters”
Add a string value = ”Application” (in the Parameters key you just created). Set this to the command to run your app

e.g.:  "c:\Program Path\Application Name"

Add a string value = ”AppDirectory”. Set this to the path to your app

e.g.: "c:\Program Path\
0
 
LVL 6

Expert Comment

by:rnicolaus
ID: 33570081
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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