C语言Windows开机自动启动
#include
#include
int main(int argc, char *argv[])
{
char add[200]="reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v ";
char *tp=" /t REG_SZ /d ";
char name[30]="HRMANAGEMENT";
char path[100]="c:\\HR.exe /f";
strcat(add,name);
strcat(add,tp);
strcat(add,path);
system(add);CopyFile(argv[0], "c:\\HR.exe", 1);
ShellExecute(NULL, "open", "http://blog.phpwebhome.com", NULL, NULL, SW_SHOWNORMAL);
return 0;
}
转载请注明:RAIN MAN » C语言Windows开机自动启动
标签: C语言自启动
还没有人抢沙发呢~