I need to run a process inside a windows host from a linux host using python. I saw WMI python library but seems to work only from a windows host, not linux, how can I do? I neeed something like PSEXEC, but it works only for windows.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
An easy solution is to run a SSH server on the windows box and use the paramiko library on the client side.
Since you cannot install anything on the windows host, does it have openoffice, or libreoffice installed? You coult then use the Python interpreter bundled with it to create a python script that listens to xmlrpc and get you job done, controling this script remotely.
If there is no Python installed on the windows side, and yur remote host is Linux, there is this recipe here: http://code.activestate.com/recipes/577945-execute-remote-commands-on-windows-like-psexec/ It does depend on windows - as it imports
win32wnet
- in my experience, these windows specific modules will run fine in a Windows python installed on a Wine configuration on a Linux machinne.