Added Customizing option for setup.exe bootstrapper #1248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are trying to use Squirrel as the Deployment solution for a SaaS based application. In order to connect to the right database or service we need a very small but important configuration switch in the application, a tenant key. I was looking for ways to inject this configuration without having to call --releasify multiple times, because there could be hundreds of possible target environments.
So what we are trying to do now, is to customize the installer on the fly when it is downloaded from our website. I'm doing this by temporarily copying the setup exe, calling rcedit.exe --set-version-string "SpecialBuild" "MyTenantKey" and resigning it. Also for larger automated deployments we allowed to pass this SpecialBuild argument as a commandline parameter for the setup.exe.
so setting the special build attribute with rcedit and applying --special-build "MyTenantKey" as a commandline argument form setup.exe has the same effect.
When sucha specialbuild argument is passed i set an Environment Variable SQUIRREL_SPECIAL_BUILD and within my OnInitialIntall handler i can access this Information an store it in the UserConfig.
For now i'm using the --bootstrapperExe as a switch for squirrel.exe --releasify and pass my custom setup.exe, but because other people are also asking for a way to pass information through the initial setup to the app and because it doesn't change the existing behavior of your bootstrapper you might want to merge my changes to your project.
Might solve #487 as well.