简体   繁体   中英

Python VIX API run in guest vmware workstation

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

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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM