Windows Commands App

I’m really enjoying Windows 8 on a Samsung Series 7 Slate, but there are a few commands that I want to have quick keyboard, mouse, and touch access to – without cluttering Start or my Taskbar with a whole bunch of them.

I’ve created a simple HTML Application, or HTA, to provide what I’m looking for without too many lines of code.

Here’s what it looks like:

Commands App

(You’ll notice that I’m no usability or design expert! Feel free to update the graphics and colors as you see fit – they are URLs and color names in the script.)

HTA’s are effectively local HTML files that include VBScript or JavaScript which can operate on your computer’s resources. HTAs have the full power of an EXE – they can do anything to your system, good or bad.

For this reason, you should pay close attention to what an HTA does (it’s written in clear text, like a script) and be sure to download it from a trustworthy source. If you’re not sure, don’t use it. It could easily contain a “Format C:” command somewhere within.

Several anti-virus scanners stop HTAs from being run regardless of their purpose.

Installation Instructions

  1. Grab this Commands.HTA file from my SkyDrive and open it.
  2. Put Commands.HTA on your Desktop or in a folder.
  3. Open it in Notepad to see what it does.
  4. Create a shortcut to it with a target like this:
    C:\Windows\System32\mshta.exe C:\Users\<username>\Desktop\Commands.hta
  5. Give the Shortcut a cool icon, if you like. I use:
  6. Give the Shortcut a Keyboard Shortcut Key if you want.
  7. Right-click the Shortcut to Pin it to Start and the Taskbar.
  8. Launch Commands.HTA from your Shortcut, a pinned location, or by double-clicking the HTA file itself.

MSHTA.exe is the Windows program that knows how to interpret an HTA script, and is required as the first part of the Shortcut Target.

The first time you run the application, it will download several images online and cache them locally – this may take a few seconds.

You can edit the HTA file to change the colors and images used, the names of buttons, and the code used when each button is clicked. Have fun making the script do what you want it to do!

If this is your first time playing with an HTA, there are several pages online with more information about them.

Usage Instructions

Hover over each button to see the keyboard shortcut. You can also tab through the buttons and press Space or Enter to activate.

If you press the Help button, you’ll notice that the HTA also accepts a single digit argument as well, in case you want to create shortcuts that do specific things like Lock, Hibernate, Shutdown, etc.

I like to pin Commands.hta to the very beginning of the Windows 8 Start page. This way, when I press Enter on Start, it launches into Commands.hta. Then, when I press Enter from within Commands.hta, it returns me to Start. I’ll go back and forth between them like this for hours.

Testers Appreciated

If you do download and use the app, please let me know how it works for you in the comments. Feel free to ask questions or make suggestions too.

I haven’t tested this script on that many PCs – I’d be interested to know if it works for you.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s