我有这行代码
${registry::Write} "HKEY_CLASSES_ROOT\autodocedithandler\shell\open\command" "" "$PROGRAMFILES32\AutoDocEdit\AutoDocEdit.exe $\"%1$\"" "REG_EXPAND_SZ" $R0
[当我运行安装程序并随后检查注册表时,我看到只有'%1'作为值输入到注册表中-之前的路径没有建立。
任何理由?
谢谢
我的猜测是它不喜欢引号。
尝试
${registry::Write} "HKEY_CLASSES_ROOT\autodocedithandler\shell\open\command" "" '"$PROGRAMFILES32\AutoDocEdit\AutoDocEdit.exe" "%1"' "REG_EXPAND_SZ" $R0
您无需使用此插件来编写此字符串,只需使用WriteRegStr
。没有任何要扩展的内容(Explorer / shell32在内部扩展%1),因此您不需要将其作为扩展字符串类型。
我最终通过使用文件夹的定义解决了这个问题
!define DefaultAutoDocEditFolder "$PROGRAMFILES32\AutoDocEdit\AutoDocEdit.exe"
并且以后使用这种方式
${registry::Write} "HKEY_CLASSES_ROOT\autodocedithandler\shell\open\command" "" '${DefaultAutoDocEditFolder} "%1"' "REG_EXPAND_SZ" $R0
希望此解决方案可以帮助其他人。