BTW, thanks for the added instructions. Here some amplifications, mostly taken from the Win32API::Registry documentation I mentioned.
For this API, you don't need "//" nor "\\\\" on the front of the machine name (though they don't hurt either).
$message is a quoted text string to display in the pop-up on $machine
I find "quoted text string" misleading here. It just needs to be a Perl string (scalar).
If "force" is false, then any applications running on the remote computer get a chance to prompt the remote user whether they want to save changes. Also, for any applications that do not exit quickly enough, the operating system will prompt the user whether they wish to wait longer for the application to exit or force it to exit now. At any of these prompts the user can press CANCEL to abort the shutdown but if no applications have unsaved data, they will likely all exit quickly and the shutdown will progress with the remote user having no option to cancel the shutdown.
If "force" is true, all applications are told to exit immediately and so will not prompt the user even if there is unsaved data. Any applications that take too long to exit will be forcibly killed after a short time. The only way to abort the shutdown is to call AbortSystemShutdown() before the timeout expires and there is no way to abort the shutdown once it has begun.
- tye (but my friends call me "Tye")In reply to (tye)Re4: NT RPC and Shutdown.
by tye
in thread NT RPC and Shutdown.
by joshi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |