Python VIX API run in guest vmware workstation

629 views Asked by At

Dears

I'm new to VIX API, based on following code

How can use VixVM_RunProgramInGuest vix library in python?

import vix

host = vix.VixHost()

vm = host.open_vm("/home/Somebody/VM/Windows.vmx")
vm.login(username="User", password="Password")

vm.proc_run("C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.EXE")

After executing the script, I found that the word application started under vmtoolsd service so it doesn't start in user space, it runs from service vmtoolsd and I see interactive message is prompted. And MsWord Application's window does appear properly.

How can I execute word as the user which I loged in?

Thank you

1

There are 1 answers

0
AudioBubble On

According to vix's documentation:

vm.login has a parameter for interactive execution. You should add the require_interactive=True to the call.

import vix

host = vix.VixHost()

vm = host.open_vm("/home/Somebody/VM/Windows.vmx")
vm.login(username="User", password="Password", require_interactive=True)

vm.proc_run("C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.EXE")