I'm building a setup project for a biometric capture application.
The thing is, for it to work on the user's PC, i need to register the .exe path in Regedit.
I'm doing it already by targeting the "Program Files (x86)" folder, as you can see below, but in 32 bit PCs it does not exist, and thus, the application won't start.
What can I do to make it work for both 32 and 64 bit architectures?
MSI installation does not require executable file registering.
It only can put information into the Windows Registry related to the application removal, etc .
By default MSI installer will put all files into the single root folder (for example, MS Office will be put into "C:\\Program Files\\Office" or to something like this). To configure target installation folder please use TARGETDIR property .
TARGETDIR property is computed during the installation (moreover - it can be overridden by user). Default property "[ProgramFilesFolder]" is x86 location, however it exists everywhere. Property "[ProgramFiles64Folder]" is what you need, however it exists on the x64 OS only.
So, what's you need:
Possible this answer can help you with examples.
After the steps above you application will select normal Program Files folder for x86/x64 operating systems.
A couple of things:
so if you really need two different builds, one with your 64-bit code and another with your 32-bit code then you need separate MSI builds using the Visual Studio setup project settings. The 32-bit one main folder would be ProgramFilesFolder in the properties of the Application Folder directory, the 64-bit one will use ProgramFiles64Folder.
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.