Closed Torchok19081986 closed 6 months ago
You need to pass the installdir value as an input property value when you run your msiexec.
It looks like you opted to give your installdir that id , which has value MYINSTALLDIR
. So you do it via MSIEXEC this way:
msiexec /i my.msi MYINSTALLDIR="c:\anydir\anysubdir"
thanks for exmplanation, @oleg-shilo. I think , now i got this. I need to create UserInput public Property and add it to msi package, just like in example of yours.
MsiProperties = "USERINPUT=[UserInput]
then i can set it. That was my mistake, i thought , i need do it before. Am i on right way, if i guess, msi doesnt show ui from it self and it will be reflected on my wpf ui ? If "CUSTOM_UI=true" is set or i need to do something ?
i tested it out. cmd-line
msiexec /i MyProduct.msi CUSTOM_UI="true" ADDLOCAL=Binaries,Documentation INSTALLDIR="C:\Apps\"
works fine. Only one difficulty : how to suppress msi ui ? I could set it to ManagedUI for standard Dialogs WPF like
project.ManagedUI = ManagedUI.DefaultWPF;
returns 1602 or 1603 msi error.
only project.UI = WUI.WixUI_Common works well.
my mistake. 1602 and 1603 msi error , because i got typo error in string after CUSTOM_UI= "true". Now i need to bring it to MVVM Pattern in WPF. how do i get rid of caliburn.macro and use another MVVM Framework. I would like to use CommunityToolKit.MVVM , but Generic Setup class rely on Caliburn.Macro. Also Commands are better to use in CommunityToolkit.MVVM.
Also Commands are better to use in
LOL, that's exactly where Caliburn shines. The only WPF command setup in CM is "if you named your button 'Exit' then the command that will be automatically attached to it is the ViewModel method that is called 'Exit'". Nothing can be better/simpler than that.
Af you do not want to use Caliburn then you don't. Just do not call any of its methods. The dialogs themselves are just ordinary WPF UserControls. But still, start your UI definition from the VS template with the all dialogs defined and then replace Caliburn binding with your alternative. As below
maybe, but i use since last year communitytoolkit.mvvm for anything as MVVM Framework. there are some reasons for this. Internal move to MVVM. For example https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/generators/relaycommand
morning, i combat since last week with Example External_UI / WpfSetup. I did some changes for startwindow , mainwindow, not to install immediatly , proceed to antoher window. Sofar ok, but how do i pass Installdir to Embeded MSI ? I know that i have to set it into Session, but it didnt work. I think , i missed something.
i also set in msi extra properties for it.