Wix-Installer-如何获取setup.exe的当前目录? [英] Wix-Installer-How can I get setup.exe's current directory?
问题描述
我正在使用setup.exe和setupbld.exe(来自%WixProramFolder%\bin)为我的安装程序制作
引导程序。一切正常,除了:
我想获取setup.exe的当前目录,但是:
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:
-
当我使用属性时 CURRENTDIRECTORY,如果我在cmd.exe中运行
命令行,则会得到错误的值: C:> D:\setup.exe。 CURRENTDIRECTORY为 C:\
,但 D:\为真。
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.
当我使用属性 SOURCEDIR时, setup.exe会将setup.msi提取到
%Temp%{ProductID} \setup.msi, SOURCEDIR是%Temp%{ProductID} \,但是
应该是 D :\
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.
推荐答案
我上周遇到了同样的问题
I had this same issue last week with a DB backup that I needed to restore as part of the install. I didn't want to include in the installer as it is likely that it will be updated and even when compressed is ~168Mb.
最后,我将文件包含在安装程序中,以便将其安装到应用程序安装目录,并在文件上设置 Compressed = no
所以这是一个外部依赖。这不是理想的方法,但是我可以使它起作用的唯一方法。
In the end I included the file into the installer so that it got installed to the application install directory and set Compressed="no"
on the file so it is an external dependency. This is not ideal but the only way I could get it to work.
这篇关于Wix-Installer-如何获取setup.exe的当前目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!