Absolute path

Nov 16, 2015 at 4:06 PM
Edited Nov 16, 2015 at 4:15 PM
I'm trying to make simple managed setup with absolute path like this:
var project = new ManagedProject("My Product",
                          new Dir(@"C:\MyProduct",
                              new Files(@"Data\*.*")));
Also specifying one custom dialog like in Samples
        project.ManagedUI.InstallDialogs.Add<WelcomeDialog>()
                                .Add<InstallDirDialog>()
                                .Add<MyProduct.UserNameDialog>()
                                .Add<ProgressDialog>()
                                .Add<ExitDialog>();
Everything builds ok, but while installation in InstallDirDialog it shows me ABSOLUTEPATH as dir value. (See picture: https://yadi.sk/i/ENQRR09xkVkSB )
Hence, it installs in right directory : "C:\MyProduct"
I'm using version 1.0.28
Is it an issue or am I doing something wrong?
Thanks
Nov 17, 2015 at 3:32 AM
ManagedUI InstallDirDialog doesn't resolve the special value of the INSTALL dir at startup. This is due to the fact that special custom scheduled for that purpose is not executed yet.

Indeed it is a problem and I logged the issue on your behalf.

The problem is now corrected and you can get the latest beta release (v1.0.28.5) from NuGet
PM> Install-Package WixSharp.bin -Pre
Nov 17, 2015 at 9:42 AM
Thank you, all ok with hotfix!
Nov 19, 2015 at 12:54 PM
I suppose one bug is still persists. I think it connected to this problem so I won't start new thread..
project.BeforeInstall += msi_BeforeInstall;
in msi_BeforeInstall function e.InstallDir and e.Session["INSTALLDIR"] resolve as "C:\ABSOLUTEPATH" while trying to uninstall.

Thanks for helping..
Nov 20, 2015 at 5:11 AM
Thanks. Yes the fix only covered ManagedUI dialog scenario but not BeforeInstall.
Resolving absolute INSTALLDIR for managed events (outside of ManageUI) was scheduled at CostFinanlize and it is too late for BeforeInstall. I have changed the code to scheduled resolving absolute path before.AppSearch and it seems to address problem.

You can get the HotFix build v1.0.29.1 from NuGet
PM> Install-Package WixSharp.bin -Pre
Mar 15, 2016 at 4:26 PM
Edited Mar 15, 2016 at 4:28 PM
I still have the original problem(InstallDirDialog shows ABSOLUTEPATH), although am using v1.0.33.0 of WixSharp.
Am I doing anything wrong?

I am using the basic Custom UI template with barely any changes.

thanks!
Mar 16, 2016 at 1:12 AM
Then you,

The problem is caused by the VS project templates extension, which does not reflect latest changes (fix from this thread) in the WixSharp.UI.Forms.InstallDirDialog class of the NuGet package (v1.0.33.0+).

I have pogged the Issue#98 for this.

Until the templates are patched you can fix it by using built-in fixed version of this dialog:
project.ManagedUI.InstallDialogs.Add<WelcomeDialog>()
                                .Add<LicenceDialog>()
                                .Add<SetupTypeDialog>()
                                .Add<FeaturesDialog>()
                                .Add<WixSharp.UI.Forms.InstallDirDialog>()
                                .Add<ProgressDialog>()
                                .Add<ExitDialog>();
Mar 16, 2016 at 9:52 AM
Ended up copying InstallDirDialog_Load from InstallDirDialog's dialog, now works.

Thank you very much!
Mar 17, 2016 at 7:57 AM
Yes, it's another way of solving the problem.

BTW I have just updated the VS extension with the latest sources from WixSharp codebase and now you (if you update the extension) the Custom UI template should work just fine.

https://visualstudiogallery.msdn.microsoft.com/4e093ce7-be66-40ed-ab16-61a1186c530e
Mar 17, 2016 at 9:01 AM
Awesome! Thanks a bunch.