RegBin是NSIS对注册表支持511超长字节进行操作的插件

/*
RegBin是NSIS对注册表支持511超长字节进行操作的插件
RegBin是一个可以写入超长字节到注册表的插件,它可以支持长度为511字节的写入.
*/
!AddPluginDir "../Plugins"
Name RegBinExample
OutFile RegBinExample.exe
InstallDir "$TEMP"
Page instfiles
ShowInstDetails show
Section "" sec1
 StrCpy $R0 "FFFF0000"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 StrCpy $R0 "$R0$R0"
 ;Write the value in one step
 RegBin::writeRegBin "HKLM" "SOFTWARERegBinExampleKey" "RegBinExampleValue1" $R0
 pop $0
 DetailPrint "writeRegBin: $0"
 ;Write a large value in multiple steps
 ;Initialize the buffer
 RegBin::init /NOUNLOAD "HKLM" "SOFTWARERegBinExampleKey" "RegBinExampleValue2" $R0
 pop $0
 DetailPrint "init: $0"
 ;Append to the buffer
 RegBin::append /NOUNLOAD $R0
 pop $0
 DetailPrint "append: $0"
 ;Write the buffer
 RegBin::write $R0
 pop $0
 DetailPrint "write: $0"
SectionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞11 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容