Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Abort Shutdown

Description
This script will send the shutdown.exe /a command to abort a shutdown in progress.
Language
C#.net
Minimum Version
Created By
Efreak60952
Contributors
-
Date Created
Nov 18, 2016
Date Last Modified
Apr 5, 2017

Scripted Function (Macro) Code

using System;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;

public static class DisplayFusionFunction
{	
	public static void Run(IntPtr windowHandle)
	{
        Process proc = new Process();
        proc.StartInfo.FileName = "CMD.exe";
        proc.StartInfo.CreateNoWindow = true;
        proc.StartInfo.Arguments = "/c shutdown.exe /a";
        proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
        proc.Start();
        proc.WaitForExit();
	}
}