I have installed a certain system on my PC. The systems software is usually installed on dedicated computers. Hence, it is started on boot, takes control of the PC, and shut down the PC on exit.
I intend to use it on a general-purpose PC (running XP-Pro). It was rather easy to prevent the system from initiating on startup (by taking it off the start menu). I can also access my PC using the keyboard start button.
My problem is that the application still shuts down the PC upon exit.
Is there a way to stop it (say, another app that stops shut downs and asks permission)?
The app itself does not support non-shutdown. I’m looking for a way to bypass the problem.
I’ve tried. As I said, they aim their application for closed systems (HW+SW, they sell both). While not illegal to work as I do, they do not support it.
Whatever this is, it’s sounding more like an operating system than an application. Aside from the typical “Your computer must be restarted for this update/installation to take effect” restart, I’m not aware of anything that can get around XP’s grip on the hardware to force a restart.
There is one other way that might work. This assumes that your normal account is a member of the local Administrators group.
Run gpedit.msc.
Expand Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment and remove the the Shut down the system right from the Users group (do not remove it from Administrators).
Create a new local user.
Create a .cmd file to launch the program under this new user’s account using the RUNAS command, e.g. runas /env /user:newuser C:\program.exe.
This should prevent the program from shutting down the machine.
gotpasswords, thank you. I will try that if I won’t find a more direct way (even though I must admit it sounds quite elegant, I have no experience with VMs).
Number,
I have followed steps 1-3. Would you mind expanding a bit re step 4? Do I need to switch to the new user account? How do I create the cmd file?
Thanks in advance!
No, stay logged on as yourself. Create a new text file on your desktop. Open it and enter runas /env /user:newuser C:\program.exe, where newuser is the name of the user you created in Step 3 and C:\program.exe is the full path of the program. Save it, then rename it with a .cmd extension instead of .txt.
Double-clicking this file will run the command. It should prompt you for the new user’s password and then launch the program using their credentials.
Hmmm…
Did that. When I run it, it asks for a password (there isn’t one). I hit Enter, and the window closes without running the app.
Do I need just the new user name, or some more info (e.g., computer name)?
Now, when I enter the password, it types:
Attempting to start <app> as user “<comp name><username>” …
In .cmd: nothing
In cmd windows: a window pops saying
Initialize information error
Please reinstall software
BTW: I found an old discussion about this app in a different forum. It seems this is a known problem. The “usual” way around it is to kill the app via task manager. But I’d ather not - this apps keeps a database, and I’m affraid it may get curropted this way.
An unsaved notepad file usually stops shutdowns and just sits there waiting for your input about saving the file. If you hit cancel, it stops the shutdown in its tracks. Very inelegant, but I often have multiple notepads open and it has saved me a few times when I’ve forgotten to untick “Reboot now”
I would say that is an indication that the software you’re running requires (or at least demands) to be run with Admin privileges, perhaps only because the programmer wanted it that way, but perhaps for the very reason that it expects to be shutting down the machine when it is terminated.
Using FileMon from www.sysinternals.com you should be able to determine whether the offending App closes its data files (it probably does, only a stupid programmer keeps files unflushed unnecessarily).
If that is the case, then Task Manager shutdown should be safe.
Apps know (roughly) where the command to shut down comes from, so my guess is that it tries to power off the machine unless it thinks the machine is about to be powered off.
On an NT based machine you have to jump through some hoops changing privileges to use ExitWindowsEx to power off.
AdjustTokenPrivileges is at the core of that little rats nest, but I reckon that one could flip the system out of Admin mode.
Just looking into the problem makes me feel slightly queasy.
How much time do you have before the machine shuts down? You can go to Start -> Run and type in shutdown /a which will prevent a system shut down, if you have time enough to do it.
It did indeed stop the shutdown, but not before the app managed (I think) to make some damage. For example, the taskbar icons are gone. And there is an app window that won’t close.
Probably… The thing is this app came with the HW I bought, and any replacement app must work with it. And in any case, it will probably cost more than I’m willing to spend.
I’ll try that. The thing is, the app in question is a surveillance system. It continuously collects camera data and stores it into the database. So I assume at any given minute the DB may be open.
I do have a couple of seconds. But guess what: the app won’t let me access the “run” command. So, only after the app exists, and shutdown is well under way am I able to try that…
I’m beginning to think it’s a lost battle.
I will attempt to try the filemon re DB state. I will also try to re-install the app under the user account (although it takes a l-o-n-g time - it has to format a dedicated partition for it!).
I will also look into the VM idea.
OK, promised an update.
filemon says app writes to disk all the time. So reboot may be not safe.
installing VM stoped my internet.
Later, my sys disk crashed.
So this app is not really my top priority now…