first , create a new file in the local JS file
JS Code:
(New ActiveXObject ("Shell.Application")). Shutdownwindows ();
two . Set shortcut keys
Set the above JS file to a shortcut key to the desktop, and then click on the file properties settings shortcut, you can use any and other shortcut keys different key combinations. Such as:
Third, the effect
When you press the shortcut key that you set on the desktop, such as pressing CTRL, ALT, and left at the same time, the effect is as follows:
Press ENTER to quickly shut down the computer.
Iv. Summary
The Axtivexobject object in JS is enabled and returns a reference to the Automation object, using the method:
var newObj = new ActiveXObject (servername.typename[, location])
Parameter (variable description):
Where newobj is a required option. The name of the variable to assign the value to ActiveXObject.
ServerName is a mandatory option. The name of the application that provided the object.
TypeName is a mandatory option. The type or class of the object to be created.
Location is an option. The name of the network server that created the object.
The Automation server provides at least one class of objects, such as a word processing application that may provide application objects, document objects, and toolbar objects.
The demo is a shell script program that enables the computer through ActiveXObject and executes the shutdown command .
One line JS fix fast shut down the machine