Wixsharp: Question: How to add FileAssociation for my Programm

Created on 3 May 2019  路  10Comments  路  Source: oleg-shilo/wixsharp

Hallo Oleg, i want to know, if there are possibility to set File Extension like *.dbl for my Programm during installation ? Many thanks for answer anyway.

question

Most helpful comment

You won't believe:
C# new File("Program.exe", new FileAssociation("dbl"))

All 10 comments

You won't believe:
C# new File("Program.exe", new FileAssociation("dbl"))

Thansk for answer, @Xaddan. Just tested, works good in MSI. And how about bootstrapper exe ? is it same declaration or ihave to set it in another way ?

The bootstrapper should not make changes on the user's computer, it should only run the installers (prerequisites and your msi).

thanks again, @Xaddan. installer goinb to set fileassociation for endpoint. i havnt tested it yet, but what happens on update ? does my file associations are gone after update. AFAIK is update uninstall old version and install newer one . Do i need set *.(extension) in update too ?

Are you using MajorUpgrade?

Yes. Same guid for project and update.

Since the new version can not only update the old installed version, but also install the product from scratch, you need to plan the installation based on this.
If the new version, when installing from scratch, must register the extension of your program, then you must add this element to the new version.

many thanks, @Xaddan , again 馃憤 . if i understand correctly, i need to use it in msi and if i use exe to install my product i have to add it to my output msi file. for update i have to verify what i need and create update exe / plan executable bootstapper for this.
Means, i have to tested it in msi / exe installer for firstinstallation and update .
Close the question.

First understand that all the changes with the computer are made by the MSI installer! Bootstrapper should not make any changes with the computer!
Make the first version of the installer. Check that it works as it should. (installs files, registry entries, creates shortcuts to files, etc.)

Make a second version of the installer. As a rule, this is the first copy as amended. (Added new files, deleted old files, added new entries to the registry, deleted old entries to the registry, etc.)
Check that it is installed from scratch. Check that it updates the first version.

If your program requires third-party programs, such as the Sql server, .net framework, then you need to use a bootstrapper. He will prepare the computer to install your system.

Make the first version of the bootstrapper. Add to it all the necessary prerequisites and your first version installer.
Check that it works as it should. (Prerequisites are installed, your installer is installed)

Make a second version of the bootstrapper. Add to it all the necessary prerequisites and your second version installer.
Check that it is installed from scratch. Check that it updates the first version.

An excellent summary @Xaddan .

For all intensive purposes every msi built needs to be considered as a complete self sufficient setup. It needs to be able to install all required arteiacts on a clean target system.

Though you can "mark" your msi as an "upgradable" msi. Every msi you build. This will simply ensyre ther any previous installation of your product will be uninstalled if found during the installation.

That's it. Nothing more, nothing else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

empz picture empz  路  3Comments

mattias-symphony picture mattias-symphony  路  3Comments

milhousemanastorm picture milhousemanastorm  路  4Comments

UweKeim picture UweKeim  路  5Comments

yfnfif picture yfnfif  路  3Comments