Ketik koding di bawah di notepad, setelah itu disimpan dengan nama registry.js. Setelah dijalankan untuk melihat hasilnya klik kanan pada start menu. Akan munculOpen Registry
ref:http://fourteam.wordpress.com/2008/03/22/other-membuat-javascript-shell-registry///Program Sederhana Membuat Shortcut Registry
//Nama Program : ShortcutRegsitry.jsvar vbCancel=2;
var vbYesNoCancel=3;
var vbYes=6;
var vbNo=7;
var vbQuestion=32;
var vbInformation=64;var natan = WScript.CreateObject(“WScript.Shell”);// Tampilan Pesan
var pesan1 = “Pilihan Open Registry:\n\n”+
“[Yes] untuk Install.\n”+
“[No] untuk Uninstall.\n”+
“[Cancel] untuk keluar.\n\n”+
“[4Team's']\n\n”+
“->Install sekarang?”var tanya = natan.popup(pesan1,0,”Open Registry”,vbYesNoCancel+vbQuestion);//Jika Yes, Buat Shortcut Registry di Directory & Drive.
if(tanya==vbYes)
{
natan.RegWrite(“HKCR\\Directory\\shell\\Com\\”,”Open Registry”,”REG_SZ”);
natan.Regwrite(“HKCR\\Directory\\shell\\Com\\command\\”,”Regedit.exe”,”REG_SZ”);
natan.RegWrite(“HKCR\\Drive\\shell\\Com\\”,”Open Registry”,”REG_SZ”);
natan.RegWrite(“HKCR\\Drive\\shell\\Com\\command\\”,”Regedit.exe”,”REG_SZ”);pesan2=”Selesai Di Install!”
natan.popup(pesan2,0,”Open Registry”,vbInformation);
}//Jika No, Hapus Shortcut Registry di Directory & Drive.
else if(tanya==vbNo)
{
natan.RegDelete(“HKCR\\Directory\\shell\\Com\\command\\”);
natan.RegDelete(“HKCR\\Directory\\shell\\Com\\”);
natan.RegDelete(“HKCR\\Drive\\shell\\Com\\command\\”);
natan.RegDelete(“HKCR\\Drive\\shell\\Com\\”);pesan3=”Selesai Di Uninstall!”
natan.popup(pesan3,0,”Open Registry”,vbInformation);
}
else//Jika Cancel, Keluar.
{
natan.popup(“Terima Kasih”,0,”Open Registry”,vbInformation);
}
Tidak ada komentar:
Posting Komentar