I managed to launch an application on Windows guest and to have the application show on the screen, so I will post here how to do if anyone needs something similar.
After putting in place the virtual machine with only host network
in order to be able to connect from Host to Guest,
I used psexec to interact with guest as the follows:
psexec.exe \ipaddress -i 1 -u WORKGROUPusername -p password c:pathomyapplication.exe -d
Some notes about the command:
-i 1
is the options that allows to interact with the desktop of the specified session
-d
could be used in order not to wait the process to terminate
WORKGROUPusername
pay attention to specify the workgroup
In order to automate operation on multiple virtual machines you can determine the ip address parsing the result of this command:
"C:Program FilesOracleVirtualboxVBoxManage.exe" guestproperty enumerate vmname
or you can parse the result of a systeminfo
on guest like the following:
"C:Program FilesOracleVirtualboxVBoxManage.exe" guestcontrol MyVMname run --username myusername --password my-password --wait-stdout --wait-stderr --exe "C:WindowsSystem32cmd.exe" -- cmd.exe/arg0 /C systeminfo
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…