oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.04k stars 168 forks source link

Create BA Installer for Server / Client Installation #1483

Closed Torchok19081986 closed 1 month ago

Torchok19081986 commented 2 months ago

Morning, i try to create BA Installer that just copy deployment Folder to path with content, where folder contains another BA Installer or msi with client installation. Because MSI isnt simple fire and forget , i thought i can set controlpanel info for hide. Somehow msi shows BA Installer in Controlpanel info anyway, regardless my efforts. As example i looked if somehow possible anyway. As good example is packge DevExpress Installaion pack. If this installer executed, there is no version or not entry in controlpanel info. Installer executed and "just" copied content to path. After further investigations i found registry entries for msi installer. Is there posibility to achieve same beheviour in wix # ? As start project i use BA Installer Template for v4. Many thanks for advices.

oleg-shilo commented 2 months ago

It's not really a WixSharp issue. If it is possible to do with WiX then it's possible to achieve with WixSharp. You need to find a way to control the bundle visibility in the control panel. I see no provisioning for that in the Burn documentation. So you need to do your own digging. As for ARP entry for the msi itself, it's controlled by the MsiPackage.Visible property.

Torchok19081986 commented 2 months ago

morning, many thanks for quick answer, @oleg-shilo. After some search i found interesting comment. All info, that i founded, suggest set Bundle / Burn App to SystemComponent, after this arp should not be visible. Unfortunatelly i cant just test it. Maybe next week. I would try it and give some feedback fo results.

oleg-shilo commented 1 month ago

let me know the outcome. Adding setting SystemComponent is an easy task. We just need to understand if is does what we want it to do

oleg-shilo commented 1 month ago

I quickly checked and it seems that ARPSYSTEMCOMPONENT is designed to Suppress MSI Files from Add/Remove Programs but not the bundle entry. Thus it already works via MsiPackage.Visible property. What you were enquiring about is hiding the bundle, not the msi. It still remains a question.

Torchok19081986 commented 1 month ago

moring, i done my another project earlier, and i tried already ARPSYSTEMCOMPONENT. Unfortunatelly , still shows Bundle. BUT i found another way to achieve my proposal. Dark.exe from Wix Toolset 3.X has line parameter -X which just unzipping content of Bundle to path. All Tries successfully runs. I tested it on my own Bundle, where MSI was embeded. Basically your example where MSI embeded to run and install AFTER unzipping to Temp. Commandline dark.exe -x <path> <installer.exe> works exactly like expected. bundle extract content to path and doesnt created any arp entries. ๐Ÿ˜‰๐Ÿ˜„๐Ÿ˜€

oleg-shilo commented 1 month ago

Great, though I am not sure it can be even considered an installer in the MSI sense.

What you have is an app, that has binary files embedded as resources and they are extracted and copied in the specific folder when you run the app.

Arguably you can achieve that with similar or even less effort with a simple WinForm application.

Nevertheless, I am happy you achieved your objective.

Torchok19081986 commented 1 month ago

many thanks, @oleg-shilo. I have WPF GUI, which is just copy of standard WPF UI with embeded MSI and jsut some colors and internal customization, thats it.
I dont want install something on windows server OS, had bad expirience with it .NET Framwork restart and MS bugs with windows updates and so on . Just extract installer for client and all dependecies for it. Thats it. And after successfull extraction , internall IT can install client for user to use programm, thats it. But here i struggled for quit some time. Here is my proposal to solve this . I have to do it with many steps . Step 1 .: Extract msi to userdefnied path with dark.exe , probably create textbox with path to extract. Step 2 .: Start current exe as Process with ProcessStartInfo and args.

just checked : dark.exe needs wix.dll to use, i have to have it too in ressources as binary to extract. I try some testproject and somehow it starts another instance of same exe with parameter. There is no parameter for Bundle to end it and restart it with new parameter, right? I need to implement it self. ๐Ÿคจ๐Ÿคจ๐Ÿคจ.