Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to write a remote window manager so that I can control my open windows via bluetooth using anyremote. There's wmctrl for Linux that manages windows from the command line. Is there similar tool in Microsoft Windows? I.e. A command line based window manager for Microsoft Windows.

If there are existing command line hacks that I could use to get the list of open windows, and bring a certain window to the front and give it focus, let me know.

share|improve this question

3 Answers 3

NirCmd by Nir Sofer is a command-line tool which can manipulate windows in all sorts of ways.

It can also automate dozens of other little tasks, like shutdown, shortcuts, screenshots, volume control. A proper Swiss-army knife of a tool.

The general format of the window manipulation commands is

nircmd win show/hide/min/max/center/close title "Window Title"

but there's a whole lot more you can do.

share|improve this answer

Windows, like Unix, has multiple shells. "CMD.EXE" is by far the best known, but PowerShell is far more capable. It's built on top of .NET, and therefore can easily manipulate windows. See http://stackoverflow.com/questions/4993926/maximize-window-and-bring-it-in-front-with-powershell for an example.

share|improve this answer

An alternative to PowerShell and NirCmd is of course JP Software's TCC/LE and TakeCommand.

They have the ACTIVATE command, that can do on Win32 pretty much all of the minimize/maximize/top/bottom/pos/close stuff that wmctrl does for X. Of course, some wmctrl mechanisms have no meaning on Win32 and no equivalents for ACTIVATE. Conversely, ACTIVATE can do some Win32 things that wmctrl has no functions for, such as manipulation of the z order, use of the taskbar, flashing, and modification of the "topmost" flag.

They also have the KEYSTACK command that can be used to send simulated keyboard input to windows.

share|improve this answer
    
wmctrl can set above and below. –  user112553 Dec 20 '12 at 17:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.