Sunday 14 March 2010

Running Series: Little Tweaks, Tips and Apps (Part 1)


Welcome to the first of a new series of mine where I talk about various tweaks, optimizations for Windows power users. I can't stress enough that this is targeted at power users. For the benefit of random Googlers that get to this blog who may not be full out power users, I'll try to keep the description, instructions or whatnot as complete as possible (which is my style anyways). In this opener, I'll share one very useful app I've built out and a couple nifty tricks.




System Path Tweaking
If you don't know how to alter the system path on your machine, look here. The exact same steps are taken for Vista/7. This little tweak will be referenced in a lot of my pointers: set aside a folder somewhere that is referenced in the system path (say, C:\MyQuickShortCuts). Now put all your shortcuts that you might need regularly in this folder. It's probably beneficial to rename the shortcuts to be shorter than the original name. Some example shortcuts I have in mine:
  • "ie" references "c:\Program Files\Internet Explorer\iexplore.exe"
  • "ie32" references "c:\Program Files (x86)\Internet Explorer\iexplore.exe"
  • "gm" references "ie www.gmail.com"
  • "g" references "ie www.google.com"
  • "yt" references "ie32 www.youtube.com"
As you can see, the limits are endless as to how you can reduce your type/click load. 


Process Termination
Skip to the downloads here.

We Windows users (and possibly more likely, us power users) tend to get hung applications a lot. Whether it's because we're trying out the latest and greatest beta build of a some new fandangled application or we're tinkering with driver revisions, it happens. So we are all familiar with the CTRL+ALT+DEL, right-click, end-process. While it get's the job done, it's far too much work for me (on Vista/Win7 the process get's extended with an 'alt-t').

So I wrote up an application to reduce the amount of 'hands-moving-across-the-keyboard in non-optimal patterns'. I dubbed it "process killer". One of the nice benefits of it was that it was also a really clean way to kill all the various IE/Notepad windows open at once. That app, I wrote way back in the VB6 days.

Something missing from the original process-killer's functionality was the ability to kill select instances  of an application. The difference here is that, if I've got 20 instances of Explorer running, running the original tool would kill all 20 instances whereas I might have only wanted to kill the one. So I set about to re-write the code (this time around in C#). The new version is smaller, lighter, faster, and has added functionality. I've kept the old version around for tech-support purposes - not everyone has .NET installed -- hell, I avoided it like the plague up until the waning days of XP, mostly due to the resulting systemwide 0.001% slowdown (although now with it's integration into the core OS and exponentially faster hardware, it's simply a non-issue for me at least).

Using the application is pretty straightforward. Simply call the application and pass the task-name of the offending application as a parameter (rewrite/legacy)
  • processkiller.exe notepad  or pk.exe notepad
  • processkiller.exe firefox or pk.exe firefox
  • processkiller.exe iexplore or pk.exe iexplore
  • processkiller.exe devenv or pk.exe devenv
With the re-write, I've added the ability to kill processes based on their process ID
  • processkiller.exe 5449
  • processkiller.exe 2407
Of course, this is kind of clunky so, I would reccomend setting aside a folder (say, "C:\MyQuickShortcuts") and making a shortcut to the process killing application there. I renamed the shortcut to "pk" to reduce the amount of typing required. The second step would be to add this folder to the system path. See the 'System Path Tweaking' point if you don't know how to do this. Now you can kill processes with WIN+R, pk <processName>. Short and sweet.

Downloads
  • Legacy version (VB6, for systems without .NET). This will not be updated anymore. The file hashes are included in the zip. [Link]
  • Current version (.NET required, you can download it here if you need to). As I think of things to add to this, I'll add them (although to be honest, there's not a whole lot to be added to such a bare bones utility). The file hashes are included in the zip. [Link]
  • If either of the links are broken, feel free to leave a comment and I'll get back to you.


CD Image Ejection
I'm lazy. That being said, the less I have to use the mouse, the better as mousing around is notably slower than to-the-point shortcuts. I use Daemon Tools Pro Standard on my main machine and Daemon Tools Lite on various other machines. The one central irk is the amount of mousing required to eject an image from the virtual drive. The folks that make Daemon Tools have this documented but it's a timesaver worth repeating. While you can opt to eject individual drives (see the documentation link), I mostly run only one or two drives.

To implement this little trick,
  • Goto the location you installed Daemon Tools. If you are using DaemonTools lite then make a shortcut for DTLite.exe, if you are using the full version, make a shortcut to DTProAgent.exe.
  • Add the parameter unmount_all to the shortcut's target. Screenshots: [Lite] [Standard]
  • Put that shortcut in special folder that is in your system path. I would reccomend renaming it to something shorter like "ej". See the 'System Path Tweaking' point if you don't know how to do this.
  • Now to eject your cd images, simply WIN+R, ej
Note: you'll need to have command line parameters enabled! [Screenshot]

No comments:

Post a Comment