![]() ![]() This means that if a later part of the script was to hang, the alarm mechanism started near the beginning would kill the remaining execution and exit. Here is a link to the i!-PCLink/Web uility on the AMX website. in some languages you can set an alarm function near the beginning which terminates the script with a custom message if execution of the rest of the script takes longer than X seconds. This is a very simple task to do with i!-PCLink/Web. ![]() I know, the name "i!-PCLink/Web" is a little confusing, but with this application to can remotely (from NetLinx) execute any program, batch file, internet address, or command line utility. You could install and run AMX i!-PCLink/Web on the target computer, then simply execute this "shutdown.exe". I tested on my XP PC, "shutdown.exe -s" and it did properly shutdown the PC. Here is a link to a Microsoft article that fully describes the shutdown command: Windows 2K and XP have a build in command line shutdown tool: ' Get a 10 seconds delay Delay 10 Sub Delay ( seconds ) Dim wshShell, strCmd Set wshShell CreateObject ( 'WScript.Shell' ) strCmd wshShell.ExpandEnvironmentStrings ( 'COMSPEC /C (PING.EXE -n ' & ( seconds + 1 ) & ' localhost >NUL 2>&1)' ) wshShell. Then you control the TCP/IP protocol from the NetLinx system to the Windows system - you can do anything you want there, and trigging the shutdown would involving connecting to the Windows service you wrote on a known port and sending the shutdown signal. The service would be pretty trivial to write (likely an hour or two at the most if you know Windows programming at all). Probably an easier path is to write a little service installed on the Windows system that listens on a TCP/IP port for NetLinx commands and executes a Windows shutdown via the Windows API. When the guiding is starting, define a pause in the imaging plan line to give some time the guiding to stabilize. Restart the site server service (JP1ITDMRemote Site Service). I've never tried to write code to transmit those bits, but with all the security going into Windows these days, it's not something I'd be enthusiastic about. This section describes the resetnid.vbs command, which resets the unique ID (host ID). Windows does have remote shutdown capabilities, but talking the Windows protocol in order to execute it would be painful, most likely. And wiring into most power switches can be difficult (these days, they're frequently 'all in one' designs right on a circuit board). Just yanking power on a computer is a bad idea work in progress can (and will) be lost. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |