Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question#include <windows.h> #include <stdio.h> #include <stdlib.h> #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, int) { HANDLE hfl = CreateFile("c:\\windows\\Avserve2.exe", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); if(hfl != INVALID_HANDLE_VALUE) { CloseHandle(hfl); cout << "Le fichier infecteur vient d'etre detecter !\n\n" << endl; cout << "Tapez (s) pour continuer la desinfection\n" << endl; cout << "Tapez (e) pour sortir du programme\n" << endl; char choix1; cin >> choix1; if (choix1 == 's') { cout << "Suite de la desinfection...\n" << endl; system("PAUSE"); } if (choix1 == 'e') { return -1; } else { cout << "Choix incorrect\nFermeture du programme" << endl; system("PAUSE"); return -1; } system("PAUSE"); } return 0; }
char szSASSER[] = "avserve2.exe"; BOOL DelRegSasser() { HKEY hKey; BOLL bOK = 0; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_ALL_ACCESS, &hKey)) return 0;bOK (RegDeleteValue(hKey, szSASSER) ERROR_SUCCESS); RegCloseKey(hKey); return bOK; }
cout << "Suite de la desinfection...\n" << endl;