Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic Reboot on network disconnect?
Message
 
To
11/05/1998 17:37:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098595
Message ID:
00098606
Views:
31
>>I have a wonderful little application here that just sits around all day monitoring a network directory for new files, then queueing up those files to a plotter.
>>
>>Trouble is, every time a tech shuts down the server, he forgets to restart this little application server.
>>
>>It's running on NT4, and I'd like to work out a way for it to force a 'ShutDown and Restart' if it remains disconnected for an hour (the delay would allow the server to be restarted for legit reasons without making the app server reboot constantly).
>>
>>So I guess my question is: How do I force a reboot in NT from VFP?
>
>Better, just define your application as a service. And, bingo, when the server reboots, it runs.

Sorry - I obviously wasn't clear. The machine running the application is not the same machine as the server - so I need to monitor a directory on the network and then force a reboot when it disappears.

I found a reference here for:
DECLARE INTEGER ExitProcess IN Win32API INTEGER nExitCode

and then...
=ExitProcess(2)

I presume this will do what I want in NT.....

If I'm wrong, let me know - otherwise

Thanks!
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform