This project is read-only.

Issues and how to extend

Sep 12, 2016 at 9:26 PM
First, thank you for what promises to be a great springboard to getting the installer done!

Server 2012R2, VS 2015 Update 2, WiX 3.10.3, WiXWPF 3.10

I am having a few issues. I was able to get my MSI and dependencies shoe-horned into the bundle.wxs and build something which kicks off my msi. Great. There were a couple of issues there, though:

I then tried to change the logo to our corp logo, but couldn't replicate how your stock logo was referenced. Dropped the new logo.png into the same folder as the stock one, added to the project, changed the name in the designer and it would simply not show. Had to change the reference you were using and give it the full path to get it to show up.

I can install OR uninstall... not both from the gui as it is now. Should I be able to click uninstall after installing (without having to restart the installer?)

I then tried to add Modify so our users could update their installations, Added the button and added a line to OnButtonClick():

case "MODIFY": { Bootstrapper.Engine.Plan(Wix.LaunchAction.Modify); } break;

But, it does nothing.

In fact, I cannot seem to debug this at all. Built it in debug mode, tried launching the resulting EXE as the Start Action (in the UI project, Debug tab), then I tried attaching to an existing process (tried both threads) with no success.

How does one debug these types of programs?
Sep 13, 2016 at 3:14 AM
Hi it's been a while since i have actively coded on this project, but if i recall correctly, the image is added to the project and the build action is set to "Embedded Resource". That build action is what enables it to be referenced with that type of Uri.

Yes you should be able to install and uninstall without having to restart the bootstrapper executable but that does not happen OOTB. you would need to ensure that you are overriding the proper methods to track the installation state of your payload (MSI packages) and update the state object (InstallInfo if you're sticking pretty close to the example) accordingly.

For debugging you'll have to use a little trick in the System.Diagnostics namespace that should look kind of like this:
if (!System.Diagnostics.Debugger.IsAttached)
I strongly recommend using that debugger code with caution because you don't want to leave it in production code.

Hope this helps.
Sep 13, 2016 at 3:53 PM

Following your hint, I found that, your example set the logo.png to be of type 'resource', so, I did that, recompiled and now that works.

Debugger tip works great - thanks!

Problem I have now is, trying to understand how to implement "modify", as in 'modify' or 'change' an existing installation (ie: by displaying and using the Change button in ARP).

I found that the code I added does get executed (the call to Plan with Modify as the arg), then the Apply method is called... but nothing happens. Uninstall also doesn't seem to work.

There are other things I need to do with the UI, but this is the function of primary importance right now. Thanks for any help you might be able to offer!