Monday, June 2, 2008

Shutdown with right click

Open your notepad and Type this script code or just copy paste


var vbCancel = 2;
var vbYesNoCancel = 3;
var vbYes = 6;
var vbNo = 7;
var vbQuestion = 32;
var vbInformation = 64;
var natan = WScript.CreateObject('WScript.Shell');
var kata = 'http://technologyjuice.blogspot.com';
var pesan1 = 'Option:\n'+
'--------------------------\n\n'+
'1. Click ["Yes"] -> instal.\n'+
'2. Click ["No"] -> remove.\n'+
'3. Click ["Cancel"] -> stop.\n\n'+
'>> Your option? <<' var tanya = natan.popup(pesan1,0,kata,vbYesNoCancel+vbQuestion); if (tanya == vbYes) { natan.RegWrite('HKCR\\Directory\\shell\\mati\\', '> Shutdown Windows!','REG_SZ');
natan.RegWrite('HKCR\\Directory\\shell\\mati\\command\\',
'shutdown.exe -s -t 0','REG_SZ');
natan.RegWrite('HKCR\\Drive\\shell\\mati\\',
'> Shutdown Windows!','REG_SZ');
natan.RegWrite('HKCR\\Drive\\shell\\mati\\command\\',
'shutdown.exe -s -t 0','REG_SZ');
pesan2 = 'Instal finish!';
natan.popup(pesan2,0,kata,vbInformation);
}
else if (tanya == vbNo)
{
natan.RegDelete('HKCR\\Directory\\shell\\mati\\command\\');
natan.RegDelete('HKCR\\Directory\\shell\\mati\\');
natan.RegDelete('HKCR\\Drive\\shell\\mati\\command\\');
natan.RegDelete('HKCR\\Drive\\shell\\mati\\');
pesan3 = 'Remove finish!';
natan.popup(pesan3,0,kata,vbInformation);
}
else
{
pesan4 = 'Stop!';
natan.popup(pesan4,0,kata,vbInformation);
}


and last save as shutdown.js


run this script code with double click, or right click and chose open with command promt.




i hope you enjoy......

1 comment:

Syam Komeng said...

bro....x jadi pun...huhu