I'm looking at a problem with a java webstart kiosk app of ours. I occasinally get a support ticket saying that multiple instances of the app were found running at once on one PC. This causes problems with the app connecting to the singular derby database local to each kiosk PC. The problem is sporadic and uncommon.

Now I've found that occasionally the kiosk PCs will run virus scans, during which time the scanner process flips its lid and maxes out the CPU. If this is happening, then booting the app from desktop can take up to 5min while the poor computer finally gets enough breathing space to launch a new program. I suspect that our clients support people, after dealing with some problem or other on whatever PC, will reopen the app, get frustrated that it isn't launching, and then open a few more instances until one finally runs.

I intend to add something like this to the manual launch script to detect whether the app is already running, but if the PC is choked out I don't know whether the process will be detected or not.

In the above scenario where a program is slow to launch, will its process be detectable immediately, or not until later when it's opened its window or whatever? I can write up a program with a few threads running busy methods that will max out the CPU - would such a thing be an accurate simulation for testing, or will I need to also continually grab file handles, or something else?

  • I used batch with sounds played using a cmd wave player, even if the pc is bogged down in other tasks (hard to do now on these faster system) the sound playing indicated that the program has been run (the button was pushed). If I was moving too fast (impatient) or the computer was moving too slow, I would know I had actually hit the button. Is there any way you can put in a high priority low effort, visual or audible clue that indeed it is at least trying to run? 5min has also indicated at times that a HD was about to fail. – Psycogeek Jun 17 '14 at 2:06

Simulate a bogged down PC with a high priority task that loaded the whole cpu, that should give you enough time to test. Benchmark programs like prime and intelburn and others, when set to load all available cpu cores, and set to high priority, will cut off other programs from getting any cpu time slices, that is one way to incidentally suspend other processes.

Priority can be adjusted via the task manager, or using the >Start command , which works in xp and 7.

You could also do a real suspend in win7 and I assume 8 , the Resources monitor can set a process to suspend, this would stop it cold for testing.

I use the PV method for different purposes. Some of these are really old and unused, because of the faster system, but tested.

Run if not running


echo OFF
C:\Desk\batch\pv.exe -q -c SHOWCALC.exe >nul
    if ERRORLEVEL 1 goto Process_NotFound
    start /B "beeps" C:\Desk\batch\wav.exe C:\WINDOWS\Media\AppSounds\calcC.wav

    start /B "beeps" C:\Desk\batch\wav.exe C:\WINDOWS\Media\AppSounds\ControlPanO.wav
    start /B "SHOWCALC window" "C:\desk\SHOWCALC.exe"

Bring Running foreward (-a) if running, else run it

echo OFF
C:\Desk\batch\pv.exe -q Photoshop.exe >nul
if ERRORLEVEL 1 goto Process_NotFound
C:\Desk\batch\pv.exe -q -a Photoshop.exe >nul
start /B "beeps" C:\Desk\batch\wav.exe C:\WINDOWS\Media\AppSounds\adobeeo.wav
start /B "PhotoShop" "C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe"

Kill stuff, and run high priority

C:\Desk\batch\pv.exe -qc dllhost.exe
net stop Themes
C:\Desk\batch\kill.exe -f explorer.exe
C:\Desk\batch\pv.exe -qc dllhost.exe
C:\Desk\batch\pv.exe -qkf AtiTool.exe

start /B "MassEffect"  /HIGH /WAIT "E:\game\ME\Mass Effect\Binaries\MassEffect.exe"
net start Themes
start /B "splorer" explorer.exe

Never had a problem with any conflicts in these, but as you can see I often have some sound being played to tell the human what is going on.
Most of them you could push the button over and over again, and it just does what it is supposed to do, but the system does not get slow.
Most programs show up as running in these lists and task managers as soon as the process is started, before a window for them even exists. But how a program works/starts, its dependencies (say like .net or java stuff) and what ways that it gets started or with pre-requisites and batch parts and all, could make huge differences in how quickly the main process of the program was observed by the system.

Setting priority with Start, using high but not realtime (realtime bad), might give you an edge over the AV programs, and in a kiosk with a single program running, it wouldnt hurt anything else?

There are always ways even with a highly protected program , to set that offending program to a lower priority, although indeed bus speak and drive saturation might end up needing a backgrounding of the I/O too. There are programs that have switches for backgrouding and throttling thier own I/O, but I have not seen (yet) a way to do it to any program.

  • Hm, its true that the webstart and JVM launcher processes may differ from the primary app process and complicate identifying whether its launched. I'll include a test for a running JVM anyway (bringing it to the front if it exists is a great idea) but I think setting priority is probably the most promising solution, along with visual feedback (since I dont think the support crew will nessecarily have speakers at their desk). Thanks for the lengthy response and ideas. – Numeron Jun 17 '14 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.