Board logo

标题: 关于命令行修改注册表的权限 [打印本页]

作者: rubik     时间: 2007-1-6 04:18    标题: 关于命令行修改注册表的权限
个人觉得 直接用 regini 就可以了,非常简单。也没什么必要再把这个命令包装一下了,懒

作者: lxmxn     时间: 2007-1-6 06:47
  楼主可否将这个命令的使用方法讲一下呢?

作者: HUNRYBECKY     时间: 2007-1-6 06:56
是呀,我使用这个命令,帮助都没有。

作者: rubik     时间: 2007-1-7 02:56
Originally posted by HUNRYBECKY at 2007-1-6 06:56: 是呀,我使用这个命令,帮助都没有。
此命令自带的帮助非常详细的 simple sample here:
echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run [2 8 19]>tmp.ini
echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce [2 8 19]>>tmp.ini
echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run [2 8 19]>>tmp.ini
echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce [2 8 19]>>tmp.ini
regini tmp.ini||pause
del tmp.ini
所以锁定注册表也是很容易恢复的。 也说明了regini是个非常危险的命令, 杀之:lol:
附件 1: 锁定注册表自启动项.rar (2007-1-7 02:56, 354 bytes, 下载附件所需积分 1点 ,下载次数: 74)

作者: lxmxn     时间: 2007-1-8 04:52
  regini自带的帮助在哪?

作者: electronixtar     时间: 2007-1-8 08:43
第三方的都没有vbs方便,呵呵

作者: dikex     时间: 2007-1-8 10:47
Originally posted by lxmxn at 2007-1-7 03:52 PM:   regini自带的帮助在哪?
加/?没反应……

作者: dikex     时间: 2007-1-8 10:57
找到了微软的帮助,大家看看吧 support.microsoft.com ...

作者: dikex     时间: 2007-1-8 11:07
regini.exe佩带的帮助文件regini.doc在系统中找不到,在网上找到了,不过全是英文,正在努力理解中,有那位牛人翻译一下 www.ens-lyon.fr ...

作者: lxmxn     时间: 2007-1-8 12:03
Originally posted by dikex at 2007-1-7 21:47: 加/?没反应……
  没有任何反应……

作者: rubik     时间: 2007-1-8 12:30
Originally posted by lxmxn at 2007-1-8 12:03:
Originally posted by dikex at 2007-1-7 21:47: 加/?没反应……
  没有任何反应……
D:\Document桌面>regini /? 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 manipul 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 If there is an equal sign on the same line as a left square bracket then the equal sign takes precedence, and the line is treated as a registry value. If the text between the square brackets is the string DELETE with no spaces, then REGINI will delete the key and any values and keys under it. For registry values, the syntax is: value Name = type data Leading spaces, spaces on either side of the equal sign and spaces between the type keyword and data are ignored, unless the value name is surrounded by quotes. If the text to the right of the equal sign is the string DELETE, then REGINI will delete the value. The value name may be left off or be specified by an at-sign character which is the same thing, namely the empty value name. So the following two lines are identical: = type data @ = type data This syntax means that you can't create a value with leading or trailing spaces, an equal sign or an at-sign in the value name, unless you put the name in quotes. Valid value types and format of data that follows are: REG_SZ text REG_EXPAND_SZ text REG_MULTI_SZ "string1" "str""ing2" ... REG_DATE mm/dd/yyyy HH:MM DayOfWeek REG_DWORD numberDWORD REG_BINARY numberOfBytes numberDWORD(s)... REG_NONE (same format as REG_BINARY) REG_RESOURCE_LIST (same format as REG_BINARY) REG_RESOURCE_REQUIREMENTS (same format as REG_BINARY) REG_RESOURCE_REQUIREMENTS_LIST (same format as REG_BINARY) REG_FULL_RESOURCE_DESCRIPTOR (same format as REG_BINARY) REG_QWORD numberQWORD REG_MULTISZ_FILE fileName REG_BINARYFILE fileName If no value type is specified, default is REG_SZ For REG_SZ and REG_EXPAND_SZ, if you want leading or trailing spaces in the value text, surround the text with quotes. The value text can contain any number of imbedded quotes, and REGINI will ignore them, as it only looks at the first and last character for quote characters. For REG_MULTI_SZ, each component string is surrounded by quotes. If you want an imbedded quote character, then double quote it, as in string2 above. For REG_BINARY, the value data consists of one or more numbers The default base for numbers is decimal. Hexidecimal may be specified by using 0x prefix. The first number is the number of data bytes, excluding the first number. After the first number must come enough numbers to fill the value. Each number represents one DWORD or 4 bytes. So if the first number was 0x5 you would need two more numbers after that to fill the 5 bytes. The high order 3 bytes of the second DWORD would be ignored. Whenever specifying a registry path, either on the command line or in an input file, the following prefix strings can be used: HKEY_LOCAL_MACHINE HKEY_USERS HKEY_CURRENT_USER USER: Each of these strings can stand alone as the key name or be followed a backslash and a subkey path.

作者: dikex     时间: 2007-1-8 12:35
因为数量众多,看上去会头疼……

作者: dikex     时间: 2007-1-8 12:38
为什么12楼的加/?会有帮助的?我的运行regini /?什么都没有
附件 1: 未命名.JPG (2007-1-8 12:38, 5.04 K, 下载附件所需积分 1点 ,下载次数: 1)



作者: lxmxn     时间: 2007-1-8 12:51
Originally posted by rubik at 2007-1-7 23:41: 精简版?
  应该不是精简的问题。我的测试系统是 Windows XP sp2 Professional

作者: dikex     时间: 2007-1-8 13:00
Originally posted by lxmxn at 2007-1-7 11:51 PM:
Originally posted by rubik at 2007-1-7 23:41: 精简版?
  应该不是精简的问题。我的测试系统 ...
我的一样,是rubik你的测试环境不同吧,2000?2003?

作者: zplinux     时间: 2007-4-10 02:54
Originally posted by rubik at 2007-1-7 02:56:[code] echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run [2 8 19]>tmp.ini echo HKEY_CURRENT_USER\Soft ...
感谢高人,又学会了一些技巧!

作者: baomaboy     时间: 2007-4-10 04:47
Originally posted by rubik at 2007-1-6 04:18: 个人觉得 直接用 regini 就可以了,非常简单。也没什么必要再把这个命令包装一下了,懒
echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run [2 8 19]>tmp.ini
echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce [2 8 19]>>tmp.ini
echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run [2 8 19]>>tmp.ini
echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce [2 8 19]>>tmp.ini
regini tmp.ini||pause
del tmp.ini
上面也没有直接用 regini ,说包装的话还不是用p包装了 ,为了什么啊 ?方便省事! 微软把命令行输入都用鼠标包装起来了,大家都在用 ,为什么啊 ,还不是图某些时候、某些情况下方便省事吗! [ Last edited by baomaboy on 2007-4-10 at 04:49 AM ]

作者: 6622186     时间: 2007-4-23 10:20
regini 的 ini 与 .ini 文件与关系吗?

作者: chengfdn     时间: 2007-4-24 05:21
默认的2000系统中可以改吗?不加第三方软件。

作者: wangzenggogo     时间: 2008-5-29 20:18
这个码 挺难的

作者: fzp070     时间: 2008-5-29 23:38
这个好东东呀,又长见识啦

作者: kaihe     时间: 2009-12-23 09:37
强烈学习!!!!

作者: rzh0     时间: 2010-10-19 22:38
学习学习~!

作者: rzh0     时间: 2010-10-19 22:38
多谢分享~~!