cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
javasaran
Level 3

How to get the status of Windows Virtualization enabled or not?

Hi, We have a requirement as part of pre-installation steps to check the status of virtualization enabled or not in windows machine where the installation is being made. Is there any built-in function to acheive this in installshield pro? Thanks in advance. Regards Saran

Labels (1)
0 Kudos
(4) Replies
Bikram
Flexera Alumni

Hi javasaran

Please refer the following document to detect whether the installation is being run on a Virtual Machine. 

https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/DetectingVirtualMachine.htm

I hope this might help your requirement.

Thanks,

Bikram

0 Kudos
banna_k
Revenera
Revenera

Hi @javasaran ,

 

You can write your own custom action through an msi extension DLL to see whether the virtualization is enabled or not:

Like below:

UINT _stdcall IsVirtualizationEnabled(MSIHANDLE hInstall)
{
if
(IsProcessorFeaturePresent(PF_VIRT_FIRMWARE_ENABLED))
::MsiSetProperty(hInstall, _T("VIRTENABLED"), "TRUE");
else
::MsiSetProperty(hInstall, _T("VIRTENABLED"), "FALSE");

return 0;
}

https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent

This custom action can be sequenced during the starting of your installation to retrieve the virtualization status.

 

0 Kudos

Thanks much for your reply. Is there a way i can display this result into dialog by displaying the feature:status For example, virtualization_enabled PASS/FAIL. Based on the result, i will have either move on to next step or exit the installation. Looking forward your reply. Thanks Saran
0 Kudos

Hi @javasaran,

 

Again, you can use one more property to bind the string with your 'Text Area' control in Dialog. And the Property string can be changed from your custom action based on the virtualization value.

Help net link for the Text are control: 

https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/IHelpEUDialogsTextAreaProps.htm 

 Here, you can set the Text attribute of Text Area control to a property; Text = [VIRTULIZATIONSUPORT] 

VIRTULIZATIONSUPORT is a property, its value can be changed based on the detection of virtualization.

0 Kudos