简体   繁体   中英

Install Shield msi file installing to the wrong directory (error 1309)

I am using Visual Studio 2013/ISLE to create a C# program with a .msi install image. When I run install from VS the program is installed in the expected location, eg c:/Program Files (x86)/...

I'm sure that this is something simple but I can't figure it out. A pointers would be greatly appreciated.

When you run a 32-bit installer in x 64-bit system Windows will always redirect your installer writing to c:\\Program Files to c:\\program files (x86) . If you want to install to the non-x86 folder you will need to provide a 64-bit installer for your application.

This blog post explains why Windows does this .

It looks like InstallShield LE will allow you to write to the correct folder when your project is set to AnyCPU , but for more advanced scenario's you'll need to use the Pro version or the free Wix installer .

I assume the question is why the installation MSI fails when you run it outside of Visual Studio, but works when VS launches it?

If yes, you should first check if your ISLE project is creating an MSI or an EXE bootstrapper (that also contains the MSI). If an EXE is created this is what you should launch manually, not the MSI. In theory, a bootstrapper can act like an initialization support for the MSI and specify default values for certain properties, like an installation folder, etc...

I say in theory because I am not very familiar with ISLE, I work with other setup authoring tools, thus cannot say for sure if this stands for ISE projects too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM