维克斯 - 安装 - 如何,我可以得到的setup.exe的当前目录?(Wix-Installer-

2019-07-29 08:49发布

I'm using setup.exe and setupbld.exe (from %WixProramFolder%\bin)to make a bootstrapper for my installer. Everything is ok except: I want to get current directory of setup.exe but:

  1. When I use property "CURRENTDIRECTORY", I will get wrong value if I run command line in cmd.exe: "C:>"D:\setup.exe"". "CURRENTDIRECTORY" is "C:\" but "D:\" is true.

  2. When I use property "SOURCEDIR", setup.exe will extract setup.msi to "%Temp%{ProductID}\setup.msi" and "SOURCEDIR" is "%Temp%{ProductID}\" but expected is "D:\"

Anybody can help me? It make me headache this time :-( Sorry about my English.

Answer 1:

上周我有同样的问题与DB备份,我需要恢复为安装的一部分。 我不想在安装程序包括,因为它很可能会被更新,甚至当压缩为168MB〜。

最后,我包括在该文件到安装程序,从而它得到安装到应用程序的安装目录,并设置Compressed="no"的文件,所以它是一个外部的依赖。 这不是理想的,但只有这样我能得到它的工作。



文章来源: Wix-Installer-How can I get setup.exe's current directory?