我是WIX新手(因为VS2013不再支持我的安装项目而迁移)。
我正在使用: Windows Installer XML工具集工具集收集器版本3.8.1128.0
我想从.reg文件中生成一个WIX片段,但在什么时候这样做:
热注册MyApp.reg -v -o MyApp.wxs
MyApp.wxs的内容很简单:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" />注册表文件MyApp.reg的内容如下:
REGEDIT
; This .REG file may be used by your SETUP program.
; If a SETUP program is not available, the entries below will be
; registered in your InitInstance automatically with a call to
; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll.
HKEY_CLASSES_ROOT\.ad = MyApp.Document
HKEY_CLASSES_ROOT\MyApp.Document\shell\open\command = MYAPP.EXE %1
HKEY_CLASSES_ROOT\MyApp.Document\shell\open\ddeexec = [open("%1")]
HKEY_CLASSES_ROOT\MyApp.Document\shell\open\ddeexec\application = AXSYS
; note: the application is optional
; (it defaults to the app name in "command")
HKEY_CLASSES_ROOT\MyApp.Document = MyApp Document
HKEY_CLASSES_ROOT\MyApp.Document\CLSID = {405890C4-E3AA-11D2-AE41-0040053793DD}
HKEY_CLASSES_ROOT\CLSID\{405890C4-E3AA-11D2-AE41-0040053793DD} = MyApp Document
HKEY_CLASSES_ROOT\CLSID\{405890C4-E3AA-11D2-AE41-0040053793DD}\ProgId = MyApp.Document
HKEY_CLASSES_ROOT\CLSID\{405890C4-E3AA-11D2-AE41-0040053793DD}\LocalServer32 = MYAPP.EXE谢谢。
发布于 2014-04-15 20:50:07
我从来没有见过像你帖子中那样的注册表文件。使用regedit中的默认导出格式,heat可以完美地工作。例如,以下是从regedit导出的内容:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Event Viewer]
"MicrosoftRedirectionProgram"=hex(2):00,00
"MicrosoftRedirectionProgramCommandLineParameters"=""
"MicrosoftRedirectionURL"="http://go.microsoft.com/fwlink/events.asp"这里使用的是Win9x/WinNT格式:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Event Viewer]
"MicrosoftRedirectionProgram"=hex(2):00
"MicrosoftRedirectionProgramCommandLineParameters"=""
"MicrosoftRedirectionURL"="http://go.microsoft.com/fwlink/events.asp"对于您来说,最简单的解决方案可能是在已有注册表项的系统上运行regedit,然后导出这些注册表项(通过右键单击注册表配置单元并从上下文菜单中选择Export ),然后使用生成的.reg-file作为热运行的源。
https://stackoverflow.com/questions/23069718
复制相似问题