Ok deh to the point aja ye..
First, buka notepad.
Second, copy script dibawah ini, dan paste di notepad
------------------------------------------------------------------------
// Program Sederhana Membuat Shortcut Command
// Nama Program: ShortcutCommand.js
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 pesan1 = 'Pilihan Buka Command:\n\n'+
'[Yes] untuk Install.\n'+
'[No] untuk UnInstall.\n'+
'[Cancel] untuk Keluar.\n\n'+
'[Bangkitlah TI Indonesia Untuk Masa Depan kita, by Shinigami!]\n\n'+
'-> Install sekarang?'
var tanya = natan.popup( pesan1,0,'Buka Command',
vbYesNoCancel+vbQuestion);
if (tanya == vbYes)
{
natan.RegWrite( 'HKCR\\Directory\\shell\\tan\\',
'-> Buka Command!','REG_SZ');
natan.RegWrite( 'HKCR\\Directory\\shell\\tan\\command\\',
'command.com','REG_SZ');
natan.RegWrite( 'HKCR\\Drive\\shell\\tan\\',
'-> Buka Command!','REG_SZ');
natan.RegWrite( 'HKCR\\Drive\\shell\\tan\\command\\',
'command.com','REG_SZ');
pesan2 = 'Selesai Di Install!'
natan.popup(pesan2,0,'Buka Command',vbInformation);
}
else if (tanya == vbNo)
{
natan.RegDelete('HKCR\\Directory\\shell\\tan\\command\\');
natan.RegDelete('HKCR\\Directory\\shell\\tan\\');
natan.RegDelete('HKCR\\Drive\\shell\\tan\\command\\');
natan.RegDelete('HKCR\\Drive\\shell\\tan\\');
pesan3 = 'Selesai Di UnInstall!'
natan.popup(pesan3,0,'Buka Command',vbInformation);
}
else
{
natan.popup('Sudah Ada ya, ya sudah keluar saja.',0,'Buka Command',vbInformation);
}
------------------------------------------------------------------------
Third, save n run this script.
Mudah kan?????
Nih screenshoot nya
Cara kerjanya tinggal klik yes, trus timbul deh command prompt yang kita cari-cari…..hehe
0 Response to "Membuat Shortcut Command Promt Via Javascript"
Post a Comment