[wix-users] Installing Hyper-V from WiX
Nir Bar
nir.bar at panel-sw.com
Sun Jun 21 05:24:30 PDT 2020
Use my WiX extension https://www.nuget.org/packages/PanelSwWixExtension/
<Component Id="dism" Guid="">
<panelsw:Dism EnableFeature="hyperv-feature-name"/>
</Component>
--
Nir Bar
WiX Expert
---- On Sat, 20 Jun 2020 01:50:52 +0300 Davy Durham via wix-users <wix-users at lists.wixtoolset.org> wrote ----
Can you provide any guidance on attempting to enable the Hyper-V feature
from an installer?
I'm new to WiX, so I'm still learning.
My options are:
- Hopeful that there is a standard or extensioned way to generically
enable any of the available windows features and poof it's done
- Execute a CustomAction which is a PowerShell script or run dism
directly to enable it.
(https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/install-the-hyper-v-role-on-windows-server)
- Use a bootstrap to resolve dependencies first (this is totally
foreign to me at the moment)
- Detect if it's enabled and if not, just instruct the how to
enable it. Though, I'd prefer to do it for them
.NET 3.x is also something that must be optionally enabled.. so I
figured there'd exist some standard way of enabling that feature (or
features in general), but I didn't find much online.
Another hurdle is that enabling Hyper-V requires a reboot if it wasn't
already enabled. So, how best to resume the execute phase after the
reboot? Is this the right path:
https://wixtoolset.org/documentation/manual/v3/xsd/wix/forcereboot.html
Also, I think I'm okay leaving Hyper-V enabled on uninstall (properly
informing the user).. but I would clean up any VMs included in the
installer.
TIA,
Davy
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list