| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 365 人关注过本帖
标题:注册表停用与开启
只看楼主 加入收藏
随心
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:12
帖 子:2577
专家分:250
注 册:2007-8-12
结帖率:100%
收藏
 问题点数:0 回复次数:0 
注册表停用与开启
/*
Name: 注册表停用与开启
Copyright:
Author: 随心
Date: 15-10-07 13:07
Description:
*/
#include <iostream>
#include <cstdlib>
#include <process.h>
using namespace std;
char *start={"Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\\\
Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System]\n\"DisableRegistryTools\"\
=dword:00000000 "};
char *stop={"Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\\\
Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System]\n\"DisableRegistryTools\"\
=dword:1 "};
class regedit
{
public:
void actStart()
{
FILE *output;
if(output=fopen("$$$$$","w"))
fprintf(output,start);
fclose(output);
spawnl(1,"c:\\windows\\regedit.exe"," /s $$$$$",NULL);
cout<<"已开启"<<endl;
}
void actStop()
{
FILE *output;
if(output=fopen("$$$$$","w"))
fprintf(output,stop);
fclose(output);
spawnl(1,"c:\\windows\\regedit.exe"," /s $$$$$",NULL);
cout<<"已停用"<<endl;
}
};
void menu()
{
cout<<"============================"<<endl;
cout<<"1 停用注册表"<<endl;
cout<<"2 开启注册表"<<endl;
cout<<"0 退出"<<endl;
cout<<"============================"<<endl;
cout<<"choice:"<<flush;
}
void back()
{
system("pause");
system("cls");
menu();
}
int main()
{
int choice=0;
regedit text;
menu();
while(1)
{
cin>>choice;
switch(choice)
{
case 0:system("del $$$$$");exit(0);break; //保护环境,人人有责
case 1:text.actStop();back();break;
case 2:text.actStart();back();break;
default :cout<<"error!"<<endl;
}
}
return 0;
}
NqqCcICt.rar (123.38 KB) 注册表停用与开启


搜索更多相关主题的帖子: 注册表 
2007-10-24 23:32
快速回复:注册表停用与开启
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.044483 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved