Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SilentBootstrapperApplication #1203

Closed
Ishtiy opened this issue Sep 9, 2022 · 8 comments
Closed

SilentBootstrapperApplication #1203

Ishtiy opened this issue Sep 9, 2022 · 8 comments

Comments

@Ishtiy
Copy link

Ishtiy commented Sep 9, 2022

Hi Oleg,
This is more of a help request. My app was working fine but from today facing the issues mentioned in issue# 435.

I'm using the following line to create a silent bundle
bootstrapper.Application = new SilentBootstrapperApplication();

Where do I specify the BootStrapper. core. Config file?
How do I add to my project? I dont use new Managed BA to pass it as parameter?

I can't follow the solution given by Zeb Ur Rehamn to make a custom SilentBA

Can someone help please.

@Ishtiy
Copy link
Author

Ishtiy commented Sep 10, 2022

Build WixBootstrapper_NoUI sample and the same error:

The log here:
[2CA4:2590][2022-09-10T18:08:45]i001: Burn v3.11.2.4516, Windows v10.0 (Build 19044: Service Pack 0), path: C:\Users\c160496\AppData\Local\Temp{C126DC4B-5096-4854-9FA8-CB51FEA319FA}.cr\app_setup.exe
[2CA4:2590][2022-09-10T18:08:45]i009: Command Line: '"-burn.clean.room=C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI\app_setup.exe" -burn.filehandle.attached=628 -burn.filehandle.self=636'
[2CA4:2590][2022-09-10T18:08:45]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI\app_setup.exe'
[2CA4:2590][2022-09-10T18:08:45]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI'
[2CA4:2590][2022-09-10T18:08:45]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\c160496\AppData\Local\Temp\My_Product_Suite_20220910180845.log'
[2CA4:2590][2022-09-10T18:08:45]i000: Setting string variable 'WixBundleName' to value 'My Product Suite'
[2CA4:2590][2022-09-10T18:08:45]i000: Unsetting variable 'WixBundleManufacturer'
[2CA4:2590][2022-09-10T18:08:45]i000: Loading managed bootstrapper application.
[2CA4:2590][2022-09-10T18:08:45]e000: Error 0x8013101b: Failed to create the managed bootstrapper application.
[2CA4:2590][2022-09-10T18:08:45]e000: Error 0x8013101b: Failed to create UX.
[2CA4:2590][2022-09-10T18:08:45]e000: Error 0x8013101b: Failed to load UX.
[2CA4:2590][2022-09-10T18:08:45]e000: Error 0x8013101b: Failed while running
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleAction = 5
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleElevated = 0
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleLog = C:\Users\c160496\AppData\Local\Temp\My_Product_Suite_20220910180845.log
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleName = My Product Suite
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleOriginalSource = C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI\app_setup.exe
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleOriginalSourceFolder = C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleProviderKey = {cfd01f4b-d80b-46cd-aa66-f742d1b15a0d}
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleSourceProcessFolder = C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleSourceProcessPath = C:\wixsharp\src\WixSharp.Samples\Wix# Samples\Bootstrapper\WixBootstrapper_NoUI\app_setup.exe
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleTag =
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleUILevel = 4
[2CA4:2590][2022-09-10T18:08:45]i410: Variable: WixBundleVersion = 1.0.0.0
[2CA4:2590][2022-09-10T18:08:45]e000: Error 0x8013101b: Failed to run per-user mode.
[2CA4:2590][2022-09-10T18:08:45]i007: Exit code: 0x8013101b, restarting: No

@oleg-shilo
Copy link
Owner

You can pass it as a dependency param in the ManagedBootstrapperApplication constructor

bootstrapper.Application = new ManagedBootstrapperApplication("%this%", "BootstrapperCore.config"); 

Or alternatively, set the default content of the config file to be generated:

ManagedBootstrapperApplication.DefaultBootstrapperCoreConfigContent = "<custom BootstrapperCore.config XML content>";

@Ishtiy
Copy link
Author

Ishtiy commented Sep 14, 2022 via email

@oleg-shilo
Copy link
Owner

Is this normal?

Yes it is. Your exe is in fact an msi/buutstrapper builder. so it should be there so it can be executed from the right location soo it can find all the files required for your msi/bundle. In your very scenario it also needs to embed itself in the bundle as your exe contains the implementation of the silent BA. That's why all these files are in the output folder.

Where should I keep the bootstrappercoreconfig file?

entirely up to you. The ManagedBootstrapperApplication constructor param in simply a valid path to the config file.

@Ishtiy
Copy link
Author

Ishtiy commented Sep 14, 2022 via email

oleg-shilo added a commit that referenced this issue Sep 18, 2022
@oleg-shilo oleg-shilo added the bug label Sep 18, 2022
@oleg-shilo
Copy link
Owner

My apologies. I overlooked the very problem you were asking about.

After testing I found that the sample code was accidentally broken. Thus even though WixSharp functionality is OK you could not possibly get it working if you use the code sample. It is fixed now.

// was
 DetectPackageComplete += (s, e) =>
            {
                //Presence or absence of MyProductPackageId product will be a deciding factor
                //for initializing BA in Install, Uninstall or Modify mode.
                if (e.PackageId == "")
                {
                    switch (e.State)
                    ...
// should be
 DetectPackageComplete += (s, e) =>
            {
                //Presence or absence of MyProductPackageId product will be a deciding factor
                //for initializing BA in Install, Uninstall or Modify mode.
                if (e.PackageId == "MyProductPackageId")
                {
                    switch (e.State)

Thus the installation was never scheduled.

@Ishtiy
Copy link
Author

Ishtiy commented Sep 18, 2022 via email

@oleg-shilo
Copy link
Owner

Thank you mate :)

oleg-shilo added a commit that referenced this issue Jan 6, 2023
- Issue #1244: The directory Id generated can be too long
- Issue #1223: Non LegacyDummyDirAlgorithm creates C:\ProgramFilesFolder empty folder
- Issue #1220: ElevatedManagedAction issue
- Feature #1204: Feature - RegisterCom class to ease the registration of COM files
- Issue #1203: SilentBootstrapperApplication
- Issue #182 (extended solution): RegistrySearch has "Win64=no" when building x64 installers
- Added Self-executable_Msi sample
- Added WixBootstrapper_EmbeddedUI to demonstrate how to show managed UI if the bundled MSI
- Added sample for customization of the stock Burn UI. Triggered by #1219
- Added sample for "Issue #1218: Dynamic custom UI sequence"
- Resurrected setting user input from BA UI and passing it to the msi. RegistrySearch input is also retained.
- Added validation for `Issue #1075: [FEAT] Add error if LaunchApplicationFromExitDialog using in common Project` error.
- Fixed problem with RegKey being placed in the x86 root XML dir for the x64 project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants