开发者

How do you override ProgramFilesFolder in an msi?

I have an msi file that I am trying to install in a place other than C:\Program Files.

The directory table shows that ProgramFilesFolder is used as the default install directory. From reading this blog post I understand that ProgramFilesFolder is a standard directory so passing TARGETDIR as a property to开发者_StackOverflow the installer will not change the install location even through the directory table has it as the parent of ProgramFilesFolder.

How can I override the install location? I am a total novice in this area.


Have you tried passing TARGETDIR on the command line?

msiexec /i yourpackage.msi TARGETDIR="C:\Foo"

If the above fails, don't know if it could help in this instance, but I've used a tool to edit MSI files before, it was called Orca, maybe you can use it to overwrite some of the MSI settings?

Another possibility maybe would be to figure out what registry entry MSIs use to find out what the ProgramFiles folder resolves to, and change that entry before you run your MSI, then change it back.


First, try setting INSTALLDIR to whatever folder you want.

If that doesn't seem to do anything, then it's time to have a look at the component table and see what the Directory_ values are for those records.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜