中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 批处理怎样设置注册表的权限吗?
作者:
标题: 批处理怎样设置注册表的权限吗? 上一主题 | 下一主题
zeroten
初级用户





积分 37
发帖 19
注册 2008-1-4
状态 离线
『楼 主』:  批处理怎样设置注册表的权限吗?

像如图一样






[ Last edited by zeroten on 2008-2-23 at 10:26 PM ]

2008-2-23 22:20
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
everest79
金牌会员

一叶枝头,万树皆春



积分 2564
发帖 1127
注册 2006-12-25
状态 离线
『第 2 楼』:  

可以啊

2008-2-23 22:24
查看资料  发短消息 网志   编辑帖子  回复  引用回复
zeroten
初级用户





积分 37
发帖 19
注册 2008-1-4
状态 离线
『第 3 楼』:  



  Quote:
Originally posted by everest79 at 2008-2-23 10:24 PM:
可以啊

怎么做?请教一下

2008-2-23 22:26
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
abcd
银牌会员





积分 1436
发帖 739
注册 2007-10-11
状态 离线
『第 4 楼』:  

setacl

2008-2-24 00:29
查看资料  发短消息 网志  OICQ (470237592)  编辑帖子  回复  引用回复
zeroten
初级用户





积分 37
发帖 19
注册 2008-1-4
状态 离线
『第 5 楼』:  



  Quote:
Originally posted by abcd at 2008-2-24 12:29 AM:
setacl

什么意思啊?

2008-2-24 00:46
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
abcd
银牌会员





积分 1436
发帖 739
注册 2007-10-11
状态 离线
『第 6 楼』:  

http://www.cn-dos.net/forum/view ... mp;highlight=setacl

请搜索论坛,关键词setacl

2008-2-24 13:11
查看资料  发短消息 网志  OICQ (470237592)  编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 7 楼』:  

setacl不是系统自带的吧?
用系统自带regini命令是不是也可以啊?

2008-2-24 21:51
查看资料  发短消息 网志   编辑帖子  回复  引用回复
suntb
高级用户





积分 581
发帖 277
注册 2006-12-23
状态 离线
『第 8 楼』:  



  Quote:
Originally posted by HAT at 2008-2-24 21:51:
setacl不是系统自带的吧?
用系统自带regini命令是不是也可以啊?

第一次知道还有regini这个命令 不过在命令行下键入regini/?没有任何提示

不知道HAT兄能否简单说明下此命令的用法

2008-2-24 22:34
查看资料  发短消息 网志   编辑帖子  回复  引用回复
yjq635
初级用户





积分 109
发帖 42
注册 2007-5-12
状态 离线
『第 9 楼』:  

使用方法
C:\>regini regset.ini

regset.ini 是你要修改的数据

regset.ini 文件内容

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
test = c:\windows\system32\fucktheworld.exe

就是在启动项加个键值 test 内容是启动 c:\windows\system32\fucktheworld.exe
很简单吧!

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run [17]

把run项设为只允许system控制 其他用户不可控制 [17] 为控制参数 其他参数看帮助


               1   - Administrators Full Access
               2   - Administrators Read Access
               3   - Administrators Read and Write Access
               4   - Administrators Read, Write and Delete Access
               5   - Creator Full Access
               6   - Creator Read and Write Access
               7   - World Full Access
               8   - World Read Access
               9   - World Read and Write Access
               10 - World Read, Write and Delete Access
               11 - Power Users Full Access
               12 - Power Users Read and Write Access
               13 - Power Users Read, Write and Delete Access
               14 - System Operators Full Access
               15 - System Operators Read and Write Access
               16 - System Operators Read, Write and Delete Access
               17 - System Full Access
               18 - System Read and Write Access
               19 - System Read Access
               20 - Administrators Read, Write and Execute Access
               21 - Interactive User Full Access
               22 - Interactive User Read and Write Access
               23 - Interactive User Read, Write and Delete Access

2008-2-24 23:46
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 10 楼』:  



  Quote:
Originally posted by suntb at 2008-2-24 10:34 PM:


第一次知道还有regini这个命令 不过在命令行下键入regini/?没有任何提示

不知道HAT兄能否简单说明下此命令的用法

引用一下别人发过的帖子

  Quote:
使用方法:
regini regset.ini

regset.ini内容
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run [17]
把run项设为只允许system控制 其他用户不可控制 [17] 为控制参数 其他参数看下面的帮助

usage: REGINI [-m machinename | -h hivefile hiveroot | -w Win95 Directory]
[-i n] [-o outputWidth]
[-b] textFiles...

where: -m specifies a remote windows NT machine whose registry is to be manipula
ted.
-h specifies a specify local hive to manipulate.
-w specifies the paths to a windows 95 system.dat and user.dat files
-i n specifies the display indentation multiple. Default is 4
-o outputWidth specifies how wide the output is to be. By default the
outputWidth is set to the width of the console window if standard
output has not been redirected to a file. In the latter case, an
outputWidth of 240 is used.

-b specifies that REGINI should be backward compatible with older
versions of REGINI that did not strictly enforce line continuations
and quoted strings Specifically, REG_BINARY, REG_RESOURCE_LIST and
REG_RESOURCE_REQUIREMENTS_LIST data types did not need line
continuations after the first number that gave the size of the data.
It just kept looking on following lines until it found enough data
values to equal the data length or hit invalid input. Quoted
strings were only allowed in REG_MULTI_SZ. They could not be
specified around key or value names, or around values for REG_SZ or
REG_EXPAND_SZ Finally, the old REGINI did not support the semicolon
as an end of line comment character.

textFiles is one or more ANSI or Unicode text files with registry data.

The easiest way to understand the format of the input textFile is to use
the REGDMP command with no arguments to dump the current contents of
your NT Registry to standard out. Redirect standard out to a file and
this file is acceptable as input to REGINI

Some general rules are:
Semicolon character is an end-of-line comment character, provided it
is the first non-blank character on a line

Backslash character is a line continuation character. All
characters from the backslash up to but not including the first
non-blank character of the next line are ignored. If there is more
than one space before the line continuation character, it is
replaced by a single space.

Indentation is used to indicate the tree structure of registry keys
The REGDMP program uses indentation in multiples of 4. You may use
hard tab characters for indentation, but embedded hard tab
characters are converted to a single space regardless of their
position

Values should come before child keys, as they are associated with
the previous key at or above the value's indentation level.

For key names, leading and trailing space characters are ignored and
not included in the key name, unless the key name is surrounded by
quotes. Imbedded spaces are part of a key name.

Key names can be followed by an Access Control List (ACL) which is a
series of decimal numbers, separated by spaces, bracketed by a
square brackets (e.g. [8 4 17]). The valid numbers and their
meanings are:

1 - Administrators Full Access
2 - Administrators Read Access
3 - Administrators Read and Write Access
4 - Administrators Read, Write and Delete Access
5 - Creator Full Access
6 - Creator Read and Write Access
7 - World Full Access
8 - World Read Access
9 - World Read and Write Access
10 - World Read, Write and Delete Access
11 - Power Users Full Access
12 - Power Users Read and Write Access
13 - Power Users Read, Write and Delete Access
14 - System Operators Full Access
15 - System Operators Read and Write Access
16 - System Operators Read, Write and Delete Access
17 - System Full Access
18 - System Read and Write Access
19 - System Read Access
20 - Administrators Read, Write and Execute Access
21 - Interactive User Full Access
22 - Interactive User Read and Write Access
23 - Interactive User Read, Write and Delete Access

=========================

用regini.exe系统自带 绝对ok 举个例子。。
rem 修改注册表sam的访问权限
echo HKEY_LOCAL_MACHINE\SAM\ [1] >1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F4 [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F5 [1] >>1.txt
regini.exe 1.txt



2008-2-25 13:40
查看资料  发短消息 网志   编辑帖子  回复  引用回复
slore
铂金会员





积分 5212
发帖 2478
注册 2007-2-8
状态 离线
『第 11 楼』:  

regini貌似没有。。。

read,write,delete

没有拒绝权限哦。

2008-2-26 10:16
查看资料  发短消息 网志   编辑帖子  回复  引用回复
slore
铂金会员





积分 5212
发帖 2478
注册 2007-2-8
状态 离线
『第 12 楼』:  

只有个。。。全拒绝。。

2008-2-26 10:22
查看资料  发短消息 网志   编辑帖子  回复  引用回复
wangzenggogo
初级用户





积分 69
发帖 34
注册 2008-5-29
状态 离线
『第 13 楼』:  

rem 修改注册表sam的访问权限
echo HKEY_LOCAL_MACHINE\SAM\ [1] >1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\ [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F4 [1] >>1.txt
echo HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F5 [1] >>1.txt
regini.exe 1.txt

2008-5-29 18:38
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: