I would like to get the version of VirtualBox guest additions that are actually used on a Windows Server 2016 machine.
I tried this command
c:\Program Files\Oracle\VirtualBox Guest Additions>VBoxControl.exe --version 5.1.12r112440
but the problem is that I updated the guest additions several times and there are other folders containing different version of VirtualBox and thus of the VBoxControl.exe too, e.g.
c:\virtual_box_guest_additions>VBoxControl.exe --version 5.1.22r115126
The version actually in use is shown in the tray icon. How can I get this version using a batch script?