Comments (13)
Is there possiblity wix5 hosting ba out of process
I don't know. It's really a question to the WiX team about the product roadmap.
MS Installshield Wizard
Not sure I follow. Maybe it is a typo here.
I will try your suggestion with workaround and see what outcome is.
Absolutely. You do not risk anything by suggesting it.
. . .
After some further consideration I have decided to implement WixSharp own msi pseudo-package that would overcome WiX limitation. It will be based on the ExePackage sample that I shared with you. It will help devs to face the same challenges as you do.
The intended syntax will be somewhat similar to this:
var bootstrapper = new Bundle("My Product",
new MsiExePackage("product.msi")
{
DisplayInternalUI = true
});
. . .
This would yield the same wxs/msi as currently this code would do:
var msi_upgrade_code = new MsiParser.GetProductCode("product.msi");
var bootstrapper = new Bundle("My Product",
new ExePackage("product.msi.exe") // WixSharp own msi launcher with product.msi embedded as a resource
{
Name = new MsiParser.GetProductName("product.msi"),
InstallArguments = "/i",
UninstallArguments = "/x",
RepairArguments = "/fa",
DetectCondition = "ProductInstalled",
Compressed = true
});
. . .
bootstrapper.AddWixFragment("Wix/Bundle",
new UtilRegistrySearch
{
Root = RegistryHive.LocalMachine,
Key = $@"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\{msi_upgrade_code}",
Value = "DisplayName",
Result = SearchResult.exists,
Variable = "ProductInstalled"
});
from wixsharp.
hm, ok, thanks again. Just tried, your example in samples works. ok, i will look at it some time later.
from wixsharp.
Done. Will be available in the very next release.
from wixsharp.
If you are talking about MSI UI that it displayed from the bootstrapper exe then you need to set DisplayInternalUI = true
.
var bundle = new Bundle("My Product Bundle",
new MsiPackage(productMsi)
{
Id = "MyProductPackageId",
DisplayInternalUI = true
});
from wixsharp.
hiho Oleg, unfortunatelly not. I have to use custom Bootstrapper UI for MSI , case from bundle UI to msi package where in UI only reflected installer progress , similar to one of your example UI for Bundle. I just , at moment, cant figure out, how to tell bundle use my custom ui. MSI has publc property , that can only be started from exe. BUT all my efforts to add my custom UI , are failed, misserably. Bundle doesnt want use it. In MSI i can add assembly to use theme or UI, but not in bundle.
from wixsharp.
I think I might be missing something.
Are you trying to create a boostrapper with the stock UI that is installing an MSI that has custom (non-stock) UI?
or
Are you trying to create a boostrapper with the custom (non-stock) UI that is installing an MSI that has custom/stock UI?
from wixsharp.
sorry, i dont write clearly. my mistake.
I think I might be missing something.
Are you trying to create a boostrapper with the stock UI that is installing an MSI that has custom (non-stock) UI? or Are you trying to create a boostrapper with the custom (non-stock) UI that is installing an MSI that has custom/stock UI?
I try second part.
I am trying to create a boostrapper with the custom (non-stock) UI that is installing an MSI that has custom/stock UI.
i try to add my project. Pls, look at it, if you had some time.
from wixsharp.
Unfortunatelly, you have no good way achieving this.
WiX4 does not provide simple unified way of controllong MSI internal UI. Thus DisplayInternalUI
does not work from custom BA and you need to use another WiX4 mechanism - PlanMsiPackage
.
public ManagedBA(mba.IEngine engine, mba.IBootstrapperCommand command) : base(engine)
{
this.Command = command;
this.PlanMsiPackage += (s, e) =>
{
if (e.PackageId == "MyProductPackageId")
{
e.UiLevel = (e.Action == ActionState.Uninstall) ?
INSTALLUILEVEL.ProgressOnly :
INSTALLUILEVEL.Full;
}
};
}
The guidance is captured here. I have attached the sample too.
Though in case of "MSI custom UI", to my disbelieve, the BA is shows the msi UI but the stock one instead of the custom one. Even though executing msi alone shows the correct custom UI. Meaning that the technique that I learned from WiX team with such difficulties works only partially (for msi stock UI only).
I tested your scenario before the first release of WixSharp wix4 stream and I was under impression that it worked. But I have to accept that it is can only be explained by the recent changes in wix4 or by me mistakenly interpreting msi stock UI as custom one, meaning that wix4 never worked in the first place.
TBH my misinterpretation is quite possible as wix3 just did not show the UI at all so when UI popped I could just take it as WixSharp own UI (msi custom UI).
I suggest you test this work around (PlanMsiPackage
) as there is a small chance that what I am observing right now is caused by my environment. I hope so.
If indeed it is a problem with WiX or the way we are using it, the chances of fixing it are very low. It's very unlikely asking WiX team for explanations will help. At least if I ask :)
As a plan be you can have a look at the work around that achieves the desired result reliably but it is rather unorthodox.
Bootstrapper Custom BA (WiX4).zip
from wixsharp.
Now NSIS looks more and more attractive :)
from wixsharp.
morning, thanks again @oleg-shilo for explanation. I did not much with NSIS Bootstrapper and WixToolset / WixSharp.
for wix5 : Is there possiblity wix5 hosting ba out of process, can in future, cover such scneario or it is something another way ? I thought , i can chage one of your example to do this way. Example that i refer is ExternalUI/WpfSetup. This were my startpoint. This is exactly scenario i would like to use, BUT here i need to change UI and add wizard-like UI. MSI "embded" in UI and reflects only progress on UI. I seem many ba installer with custom UI where only 3 or 4 dialogs. Welcome, Installdir, Progress und Exit Dialogs thats it. Not all of them use MS Installshield Wizard and ~50% use wixtoolset, because log show wix toolset.
I will try your suggestion with workaround and see what outcome is.
from wixsharp.
morning, i just tried your code. Many thanks for sharing it. Somehow it produced nullref exeception with code
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
1> bei WixSharp.Bootstrapper.Bundle.ToXml()
1> bei WixSharp.Compiler.BuildWxs(Bundle project)
1> bei WixSharp.Compiler.Build(Bundle project, String path)
1> bei WixSharp.Compiler.Build(Bundle project)
1> bei WixSharp.Bootstrapper.Bundle.Build(String path)
1> bei Bootstrapper_Custom_BA__WiX4_.Program.Main()
Msi is building compelte and also msi file exists, but bundle not. Added wixextension for util and bal , doesnt do anything better.
from wixsharp.
I am not sure what exactly you are testing so cannot comment. But keep in mind that new ExePackage("product.msi.exe")
is a pseudo-code. I do not have yet the solution for building such msi-hosted exe. In the sample I mention I built the exe by hands.
from wixsharp.
Your scenario sample: https://github.com/oleg-shilo/wixsharp/blob/9c9b0444c60f129f28c9c66dfd1a0ae8470b1443/Source/src/
static public void Build(string msi)
{
// This sample does what ManualBuild does but in a single step. This is because there is no need to build
// self-hosted msi as it is automatically built in MsiExePackage constructor.
Console.WriteLine("Building Bootstrapper ...");
var bootstrapper =
new Bundle("Managed Product Bundle",
new MsiExePackage(msi)
{
Name = "ManagedProduct",
});
bootstrapper.Version = new Version("1.0.0.0");
bootstrapper.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25889a");
bootstrapper.Build("my_app.exe");
}
WixSharp.Samples/Wix%23%20Samples/Bootstrapper/WixBootstrapper_EmbeddedUI/setup.cs#L27
from wixsharp.
Related Issues (20)
- set Wix Toolset version for WixSharp HOT 5
- Duplicate component IDs are added when shortcuts are added HOT 4
- Fonts are not installed for all users HOT 4
- Custom Behavior for "X" button in the title bar HOT 3
- Cannot build .net 8 example project HOT 8
- Tags are wrong in git HOT 2
- "Complete" feature gets added automatically & after installation of MSI, an empty feature folder installed even if it is not selected HOT 14
- installDir variable erased depending on ManagedProject structure HOT 5
- Shortcut "Target" produces unexpected results for many supported WiX environment constants HOT 4
- (Race condition?) Issue with form load order (difficult to reproduce) HOT 5
- > since I know now root cause of my issue, how can I include sub folders in my new Files constructor or somewhere in Files HOT 3
- Dotnet tool should not be relied on for wixsharp. HOT 1
- Info: SFXCA: Failed to create temp directory. Error code 5 HOT 1
- How to execute rollback imeediately If i click on cancel after install execute sequence has started ? HOT 3
- Overview of which SetupEventHandler is fired on which type of project HOT 2
- Wix Woolkit 3.14.1 not working "SFXCA: Failed to create temp directory. Error code 5" HOT 1
- MSI build is failing with failed to add file - Even path is available HOT 7
- How to see in WixSharp project which Wix toolkit version is being used AFTER it has been created? HOT 3
- Restart Office apps after installation HOT 23
- Build issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wixsharp.