eXpress Share Utility wndctl.exe

eXpress Share Utility wndctl.exe
CondorMan's picture

I just discovered a nifty utility in the eXpress share called wndctl.exe. You can use it to lock the keyboard and mouse prior to any install/script and unlock it later. It can also activate, minimize, maximize, restore, hide, show, flash, close, disable, enable, tile, cascade, center, move, and resize window(s).

wndctl.exe can be found in any of the following places (in x86 and x64 versions):

  • Bootwiz\platforms\Winpe\x86\Optional\Boot
  • Bootwiz\platforms\Winpe\x64\Optional\Boot
  • Bootwiz\platforms\Winpe2\x86\Optional\Boot
  • Bootwiz\platforms\Winpe2\x64\Optional\Boot

The syntax for wndctl.exe is:

wndctl <command> [<"window title text">] [<n>]

<command> is the command to perform, and is one of the following:

-activate Make the window active
-minimize Minimize the window [for <n> seconds]
-maximize Maximize the window [for <n> seconds]
-restore Restore the window to prior state
-hide Hide the window [for <n> seconds]
-show Show the window [for <n> seconds]
-flash Flash the window title bar [<n> times (def=3, 0=forever)]
-close Close the window
-disable Disable the window [for <n> seconds]
-enable Enable the window [for <n> seconds]
-transparent[:<m>] Make the window transparent [for <n> seconds]
-opaque Make the window opaque [for <n> seconds]
-tile_h Tile all windows horizontally on desktop
-tile_v Tile all windows vertically on desktop
-cascade Cascade all windows on desktop
-center Move window to center of screen
-move:<x>,<y> Move window to <x> and <y>
-size:<w>,<h> Resize window to <w> and <h>
-top Make window topmost
-bottom Make window bottommost
-mid Make window not topmost
-title:<title> Set window title (to <title>
-poweroff[:force,noprompt] Power system off
-shutdown[:force,noprompt] Shut system down
-reboot[:force,noprompt] Reboot system
-logoff[:force,noprompt] Log user off
-lockuser[:force,noprompt] Lock workstation
-lock Lock input for all windows [for <n> seconds]
-unlock Unlock and allow input for all windows
  • <"window title text"> is the title bar text of the window to operate upon.
    • The * wildcard can be used for partial window title matches.
    • If *, then all windows are used.
    • If not specified, then the current window is used.
    • Ignored for the -lock and -unlock commands, which affect all windows.
  • <n> is the number of seconds or times before the command is terminated.
    • (Number of times to flash window for -flash command.)
    • If not specified, then the command is permanent,
    • Press any key to end before time expires.
    • Ignored for the -activate, -close, and -restore commands.
3.942855
Average: 3.9 (35 votes)
Syndicate content