Closed serezlan closed 1 year ago
UILoaded
is only firing when user defines managed UI as the UI for your setup. If it is the native UI you are using, then it will not fire. Quite possibly it is your case.
Load
(or BeforeInstall
) fires before the install starts and it has no connection to what UI you are using.
Read more here: https://github.com/oleg-shilo/wixsharp/wiki/Managed-Setup-Model#event-driven-custom-actions
Sorry for my late response. I've redo my work based on your information and git it working.
Thx.
Hi,
I'm trying to get something done at the beginning of installer. From the sample, this should be achievable through UILoaded event. However I cannot get my code executing.
Could you help me pinpoint the problem? Here's the code:
var project = new ManagedProject(GetProductNameWithVersionNumber(), new Dir(string.Format("%ProgramFiles%\{0}\{1}", cfg[Util.Config.CompanyNameKey], cfg[Util.Config.ProductNameKey]), new Files(cfg[Config.BaseDirKey] + ".")));
// ...
public static void Init3(SetupEventArgs e) { var tmpFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "delta.txt"); System.IO.File.WriteAllText(tmpFile, "alpha centauri"); }
There should be a file in temp dir.
Thx.