Add GUI for checks
Details
Add a GUI for the checks before installation similar to the one in commando-vm.
I meant this code in commando-vm: https://github.com/mandiant/commando-vm/blob/main/install.ps1#L69
@Ana06 we have more checks such as the Internet connectivity checks or the Powershell version check, so you also want to add it to this Window? Shall I add another check to remind the user to create a snapshot same as we had in the cli version?
@sara-rn
we have more checks such as the Internet connectivity checks or the Powershell version check, so you also want to add it to this Window?
yes, I provided the commando VM reference as an example. We should have the same checks in UI as in the console.
Shall I add another check to remind the user to create a snapshot same as we had in the cli version?
You could have a checkbox the user needs to click to confirm they have taken an snapshot
Also, commando VM allows to continue the installation if a check fails, but we are not allowing this in the console in some cases (depending on the check). This should also be consistent in both views in FLARE-VM.
Thanks @Ana06 we allow some checks to fail if the user specifically accepts to continue, in this window I suggest doing the same so if the user ticks the checkbox and the check is a blocker we can display a message box warning the user, would that be ok? happy to accept other inputs!
@sara-rn
Thanks @Ana06 we allow some checks to fail if the user specifically accepts to continue, in this window I suggest doing the same so if the user ticks the checkbox and the check is a blocker we can display a message box warning the user, would that be ok? happy to accept other inputs!
In the command line, we do not allow to continue if we know the installation is going to fail (for example if the script is not run as admin). I think we should also not allow to continue in the UI in this case. What about displaying the status of all the checks and depending on which ones fail, display a Continue button (with a checkbox/warning that the installation may fail) or a Exit button (with a text/warning informing it is not possible to continue)??
We have to ensure we do not duplicate code to make it easy to keep both views consistent. One way to implement this is to have a checks array with an entry per check with the following information:
(name, function, allow_continue)
For example:
("PowerShell version >= 5", Check-PowerShell-Version, False)
The function should return an info message that we can display in the command line (as we do at the moment) and we could also display it in the UI (extra info when a check fails). For example:
function Check-PowerShell-Version {
$psVersion = $PSVersionTable.PSVersion
if ($psVersion -lt [System.Version]"5.0.0") {
return "You are using PowerShell version $psVersion. This is an old version and it is not supported"
}
}