[wix-users] Installing Hyper-V from WiX

Davy Durham ddurham at davyandbeth.com
Mon Jun 22 09:18:51 PDT 2020


Thanks. This could prove useful!  Is there any more specific on the dism
action?  Other parameters it may accept?

Also, does it handle or assist with the need to reboot after enabling
Hyper-V before the installer can programmatically define a VM? Or must I
reboot and resume the execute phase myself?

And I would want to reboot if Hyper-V were already enabled, so does the
dism action indicate it it actually had to enable it?

Regards



On Sun, Jun 21, 2020, 07:24 Nir Bar via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> 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/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/



More information about the wix-users mailing list