我需要以编程方式访问引导程序的卸载位置。我需要这个信息,因为在卸载链中的包需要的一些文件,一旦所有包成功安装,就需要移动到这里。
我可能需要将注册表中UninstallString的值修改为不同的位置,并将引导程序可执行文件和其他所需文件复制到此位置。这样做有什么副作用吗?
发布于 2013-05-24 02:48:48
您可以使用payload添加所需的文件。这些文件被打包到您的boostrapper.exe中,并在执行过程中在执行引导程序的同一文件夹中可用。将引导程序应用程序所需的文件添加到引导程序应用程序的有效负载中。
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload SourceFile='MyBA.dll' />
<Payload SourceFile='BootstrapperCore.config' />
... place additional playload files here ...
</BootstrapperApplicationRef>您可以使用以下命令从引导程序代码中访问它们
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "payloadfilename");您还可以将文件添加到特定的包。
<ExePackage InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]"" >
<Payload SourceFile="payloadfilename"/>
</ExePackage>https://stackoverflow.com/questions/16549031
复制相似问题