Winexe on Ubuntu

· 200 words · 1 minute read

If you're running a Linux desktop in an otherwise Windows environment, winexe may be something you'll enjoy.

Winexe allows you to execute commands from a Linux machine on a remote Windows machine, as if you're sitting at the Windows command prompt. Think of the possibilities!

Recently, I found a way to get it to compile on my beloved Ubuntu Maverick (it broke when I dist-upgraded for some reason), and I thought I'd share. Winexe doesn't have a Debian package that I'm aware of, and getting documentation on how to make it compile is spotty at best. The official SF page might be the obvious destination to find out how to get it, but alas, it no workie.

Fortunately, the peeps at Zenoss got your back. Here's the scoop:

(The patch is necessary to fix a tiny typo in winexe/service.c – if it doesn't apply properly, chances are good the typo has been fixed since this blog post.)

Once you've compiled, now for some fun!

Never again must you VNC into a Windows box just to restart a service! I even have a script that remotely executes a "git pull" and then restarts all the relevant Windows services. Poor man's deploy FTW!!1