论坛风格切换切换到宽版
  • 1951阅读
  • 2回复

NSIS 的注册表键值转换。 [复制链接]

上一主题 下一主题
离线飞龙
 
发帖
422
金钱
0
威望
0
只看楼主 倒序阅读 0 发表于: 2007-11-23
我用 reg2nsi 转换下列键值,结果什么也没有:

REGEDIT4

[-HKEY_CURRENT_USER\Software\ACD Systems]

[-HKEY_LOCAL_MACHINE\SOFTWARE\ACD Systems]

不知道如何转换.NSI,请高手看看。
CODE
轻轻地我走了,正如我轻轻地来;我挥一挥衣袖,不带走一版云彩。
离线刘波

发帖
2998
金钱
200
威望
20
只看该作者 1 发表于: 2007-11-23
就是删除键,看下面

4.9.2.3 DeleteRegKey
[/ifempty] root_key subkey
Deletes a registry key. If /ifempty is specified, the registry key will only be deleted if it has no subkeys (otherwise, the whole registry tree will be removed). Valid values for root_key are listed under WriteRegStr. The error flag is set if the key could not be removed from the registry (or if it didn't exist to begin with).

DeleteRegKey HKLM "Software\My Company\My Software"
DeleteRegKey /ifempty HKLM "Software\A key that might have subkeys"

4.9.2.4 DeleteRegValue
root_key subkey key_name
Deletes a registry value. Valid values for root_key are listed under WriteRegStr. The error flag is set if the value could not be removed from the registry (or if it didn't exist to begin with).

DeleteRegValue HKLM "Software\My Company\My Software" "some value"


即:
DeleteRegKey HKCU "Software\ACD Systems"
下面那个类推
离线飞龙
发帖
422
金钱
0
威望
0
只看该作者 2 发表于: 2007-11-23
谢谢刘波!
第2行是不是这样写:
DeleteRegKey HKLM "Software\ACD Systems"
CODE
轻轻地我走了,正如我轻轻地来;我挥一挥衣袖,不带走一版云彩。