Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Running winexe on the Mac UNIX
If you are a Unix admin and also have to maintain Windows servers, you will find winexe a must command line utility to have in your arsenal.

Until recently I have been able to do this only on Linux boxes. I have compiled it and it works great however, on Mac OS X I have not had any luck until a few days I came across this site. There are also links provided to the winexe binary packages here.

So, once you install it, the usage is simple:

Here is a quick exemple.

To get the route table on the Windows machine (using your correct IP address and other appropriate information):

winexe -U YOURDOMAIN/YourAccount%YourPassword // 'route print'

If you want to start a Windows service:

winexe -U YOURDOMAIN/YourAccount%YourPassword // 'net start "Service Name"'

Or to kill a Windows service:

winexe -U YOURDOMAIN/YourAccount%YourPassword // 'Process.exe -k 1110'

[crarko adds: I haven't tried this, but the first link will get you to the source code (GPL) so you can examine and build it for yourself. The second link points to a number of useful tools you can run in Terminal to work with Windows machines. I did a quick check of MacPorts and Fink and they didn't seem to have winexe, at least not as a standalone package.]
  • Currently 4.00 / 5
  You rated: 5 / 5 (5 votes cast)

Running winexe on the Mac | 3 comments | Create New Account
Click here to return to the 'Running winexe on the Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Running winexe on the Mac
Authored by: ebow on Aug 31, '11 10:07:26AM
In case you're like me and wondering what winexe is and if you should be interested in it, this is the description from the project's Sourceforge site:

winexe remotely executes commands on WindowsNT/2000/XP/2003 systems from GNU/Linux (probably also other Unices capable to compile Samba4).

[ Reply to This | # ]

Running winexe on the Mac
Authored by: jalex on Sep 02, '11 11:27:04AM

Be sure to be careful whenever you provide a password on the command line. If any other users are logged into the machine they can see your password in the process list. You will also likely end up with the password saved in the clear in your shell's history file. I don't know if winexe supports it, but most programs either have an option to prompt for a password when needed or to allow you to specify the name of a file where your password is stored (which you can create and delete when you're done). This is much safer than putting your password on the command line.

[ Reply to This | # ]
Running winexe on the Mac
Authored by: yaxzone on Sep 07, '11 03:29:30PM
Good point ebow. Winexe does allow you to be prompted for a password. So just type: winexe -U YOURDOMAIN/YourAccount // 'route print'

[ Reply to This | # ]