Joe-IT: Technology done right

Banish Windows Notepad: Replacing Notepad with Notepad++

n

It’s no secret around these parts that I hate Windows Notepad. It hasn’t been updated (in any useful way) since Windows 95, and is just plain inadequate for most tasks I need a text editor for. Up to this point I have been content to simply never use it, however as I am finding myself working with text files more and more these days, I would like to completely replace it.

Now obviously I am a big proponent of Notepad++, and this would be my ideal replacement for notepad.exe and luckily for me, there is a launcher made specifically for this. Before we begin, we will need to download the following files:

  1. The current Notepad++ install package from here.
  2. The current Notepad++ launcher from here.

Once we have these files, we can begin the process:

  1. Install Notepad++.
  2. Unzip the Notepad++ launcher, and have it ready to be copied (we will need to put this in a couple different directories.
  3. Turn off hide invisible files in Tools->Folder Options->View.

Now at this point it is pertinent to mention that there are several methods that may work for preplacing Notepad, you may need to try each one until you find the one that works for your OS version (Method 1 worked for me on one XP sp2 install, but I had to use Method 2 on another.

Method 1

  1. Go to %windir%\system32\Restore
  2. Select filelist.xml and right click->Properties and uncheck Read-only
  3. Edit the file, adding:
  4. <REC>%windir%\notepad.exe</REC>

    to:

    <Exclude>
    <REC>%windir%\system.ini</REC>
    <REC>%windir%\tasks\desktop.ini</REC>
    <REC>%windir%\win.ini</REC>
    <REC>*:\AUTOEXEC.BAT</REC>
    <REC>*:\CONFIG.MSI</REC>
    <REC>*:\CONFIG.SYS</REC>
    </Exclude>

  5. Copy the Notepad++ launcher to %windir%\system32, replacing notepad.exe there with the Notepad++ launcher.
  6. If this worked, you should now be able to open a Run dialog, and type: notepad {ENTER}, which will launch Notepad++.

Method 2

  1. Copy the Notepad ++ launcher to %windir%\system32\dllcache
  2. Copy the Notepad ++ launcher to %windir%\system32
  3. A dialog will pop up hit cancel.
  4. If this worked, you should now be able to open a Run dialog, and type: notepad {ENTER}, which will launch Notepad++.

Method 3

  1. Copy the Notepad ++ launcher to %windir%\servicepackfiles\i386
  2. Copy the Notepad ++ launcher to %windir%\system32\dllcache
  3. Copy the Notepad ++ launcher to %windir%\system32
  4. Copy the Notepad ++ launcher to %windir%
  5. When you replace notepad.exe in %windir% and %windir%\system32, a “Windows File Protection” message box appears, click Cancel. Then another message box appears, click OK.
  6. If this worked, you should now be able to open a Run dialog, and type: notepad {ENTER}, which will launch Notepad++.

Now, enjoy the goodness that comes from having a real text editor as your default text editor.

end

November 25, 2008 Posted by Just Joe | Admin's Arsenal, Ask an IT ninja!!! | | No Comments Yet

Admin’s Arsenal (personal edition): Songbird

I wasn’t exactly sure how to categorize this post, but I feel that it rightly belongs in the Admin’s Arsenal. Even the most nose to the grindstone SysAdmin needs some tunes. I have something playing in the background in my office pretty much all day.

Until recently I was a die hard Winamp fan (mostly because of its Llama whipping ways). As of late though Winamp has been getting more and more bloated. My copy now lags horribly when I first start it up, and it eats a ton of system resources.

Allow me to introduce you to Songbird, an open source media player based on the Firefox and VLC code. Songbird is currently in Beta, however I have been using Beta 1.0rc1 for a week or so and it is very close to being final.

Seeing the default interface, it is pretty obvious they are aimed squarely at dethroning iTunes (thank you for that, iTunes is just bloated crapware).

songbird

Now here is the really cool part; from it’s Firefox roots it has inherited what I believe is Firefox’s best feature: Add-ons. Even though this is beta software, I am really excited about this software. The potential here is epic, this could actually turn out to be the best media player on the market.

Even though it is in beta (and hence there are quite few Add-ons available for it), here is a screenshot of what Songbird now looks like on my computer:

songbird2

Notice that I have a second tab open… yeah, it’s got a browser integrated right into it, and it’s FireFox code! Here is a list of some of the features this baby offers:

  • Add media to Songbird by importing from your file system or iTunes.
  • Songbird supports MP3, FLAC, and Vorbis on all platforms; WMA and WMA DRM on Windows; and AAC and Fairplay on Windows and Mac.
  • Browse, organize, sort and search your media.
  • Songbird includes an integrated web browser with features like bookmarking, tabbed browsing, and more.
  • Songbird runs on Windows, Linux and Mac.
  • Always stay up to date using Songbird’s built-in automatic updates.

The beta version that I am showing here adds several more features, including multiple additions to mp3 player support, and metadata management.

If you find that there are features that are missing that you want, the developers are maintaining a roadmap wiki showing the planned additions to the software, so that killer feature you want may be just around the corner!

end

November 7, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: BareGrep.exe

Ok, here is the situation: you’ve got 1200 script files in a particular directory on your XP workstation, and you need to find any script that references “\\atl01\share” (queue Dennis Hopper voice), what do you do?!

Traditional convention is that you spend several hours opening each file in notepad and doing a “find”, or you might be able to cut it down to an hour or so if you opened several dozen of the files at a time in Notepad++ and did “find in all files”, or you could take about a half an hour and move the files over to a *NIX machine and use grep. I’ve got a better answer: BareGrep.exe from our friends at Bare Metal Software. BareGrep is basically a GUI version of the *NIX grep command for Windows machines, and it works wonderfully. Much like BareTail (which I reviewed here), BareGrep is fully portable, meaning you can run it from a USB drive! Here is a shot of the interface:

BareGrep user interface

BareGrep user interface

Here is a short list of some of the features in BareGrep:

  • Regular expression text search (that’s inside the files)
  • Wildcard and regular expression file search
  • Files to find or search can be specified with a regular expression
  • Multiple files can also be specified with the mouse
  • Recursive directory search
  • Frequently used text search patterns may be saved, named and edited
  • Searching while you type, to find results quicker
  • Capturing groups (using bracket characters ‘(‘ and ‘)’ in a regex) extract strings from files
  • Tabular presentation of search results
  • Export/copy of search results in many formats
  • Search files of any size (> 2GB)

Not only will this utility do all that, but it is usable from the commandline as well! What more could you want? Wait, what? You want… more features? Well you’re in luck, as BareGrep comes in two forms, the Free version (what we’ve covered so far), and the Registered version ($25 at the time of this review), which offers all of the features of the free version, as well as:

  • Selecting a search result line shows that line in context in the file
  • Tabs display files recently viewed
  • Tabs may be positioned on any side of the window and oriented horizontally or vertically
  • Lines containing particular strings can be highlighted to help you notice important text
  • Highlight colours are fully customizable

Now I can’t even begin to cover the colossal amount of time that this utility has saved me, but I can tell you that it is well worth the price of admission. BareGrep can be downloaded here.

end

November 6, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: BareTail.exe

As someone that works with Linux systems on a daily basis I have sort of a love/hate relationship with tail.exe (it can be frustrating trying to get it to display exactly what I want, though piping out to grep usually fixes that straight away).

One thing I have always wondered though is why it is not a native Windows utility. It is freaking useful!

Well all is not lost, as there are a couple of solutions available. The “just like on Linux!” alternative for Windows is Tail for Win32. This is a port for Windows systems of the “tail -f” command on *NIX systems.

My preferred solution is BareTail.exe, a more full featured offering. This is basically a GUI version of Tail which allows you to define syntax highlighting. This utility can also be run from the command line.

Here is a screenshot of the BareTail interface:

BareTail user interface

BareTail user interface

You’ll notice two important things in this interface:

  1. The multiple open tabs (you can tail more than one log file at a time)
  2. The Follow Tail checkbox (view scrolls to show files as they are written in real time)

This utility is chock full of functionality, and is natively portable (meaning you can run it from a USB drive, yes!). BareTail offers many other useful features, including:

  • Optimized real-time viewing engine
  • View files of any size (> 2GB)
  • Scroll to any point in the whole file instantly
  • View files over a network
  • Configurable line wrapping
  • Configurable TAB expansion
  • Configurable font, including spacing and offset to maximize use of screen space
  • View the end of a growing file in real time, no matter how fast the file grows
  • Like “tail -f” on Unix systems, but with many more features
  • Simultaneously monitor multiple files for changes using tabs
  • Visual indication on each tab of file status and changes
  • Tabs may be positioned on any side of the window and oriented horizontally or vertically
  • Lines containing particular strings can be highlighted to help you notice important text
  • Highlight colors are fully customizable
  • Windows / DOS text files (lines end in CR/LF pairs)
  • Unix text files (lines end in LF)
  • Microsoft IIS logfiles (and other files terminated with a string of nulls)

BareTail comes in two license formats: Free, and Registered ($25 at the time this was written). The Registered version offers all of the features of the Free version plus:

  • Regular expression text search (including line numbering for search results)
  • Searching while you type, to find results quicker
  • Feedback on regex syntax errors while you type, to build regexes quicker
  • Filter tail mode (include or exclude lines)
  • Frequently used text search patterns may be saved, named and edited
  • Export/copy of search and filter results in many formats

At only $25 for a license this is a worthwhile upgrade, but the free version is imminently usable as well.

You can download BareTail here.

end

November 4, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: mRemote

I don’t know about other admins, but I manage a LOT of remote connections in a typical day. Some days it seems like I don’t do much other than look up passwords and user names for all the remote connections I need to make to get my daily duties handled, well it used to anyway.

I’ve used many terminal mangers, and the only one that had met my needs for managing all of the remote connections I handle on a day to day basis is mRemote. The author describes mRemote as:

mRemote is a full-featured, open source, multi-tab remote connections manager.

It allows you to store all your remote connections in a simple yet powerful interface.

Currently these protocols are supported:

* RDP (Remote Desktop)
* VNC (Virtual Network Computing)
* ICA (Independent Computing Architecture)
* SSH (Secure Shell)
* Telnet (TELecommunication NETwork)
* HTTP/S (Hypertext Transfer Protocol)
* Rlogin (Rlogin)
* RAW

Now while this program has a “portable” version, it is not a portable application in the true sense of the term, as it depends on several applications that must be installed on the machine mRemote is run from to be truly useful. Here are the requirements for running mRemote:

Supported Operating Systems:

* Windows XP
* Windows Vista

Prerequisites:

* Microsoft .NET Framework 2.0
* Microsoft Terminal Services Client 6.0
Needed if you use RDP. mstscax.dll and/or msrdp.ocx must be registered.
* PuTTY
Needed if you use Telnet, SSH, Rlogin or RAW. Included in all packages.
* Citrix ICA Client
Needed if you use ICA. wfica.ocx must be registered.

ATTENTION!
mRemote was only tested under 32bit environments, so 64bit systems are unsupported but may run mRemote just as usual.

Bearing that in mind, all of the machines I would run mRemote from will already meet these prerequisites, so for me, it is as good as portable (I run it from my USB drive anyway).

Also there is a bit of controversy over this program, as the author is looking to take it commercial. However since it is currently open source, even if he does in fact go that route in the future, I’m quite sure that someone else will pick up where he left off with the open source version.

You can download mRemote here.

end

September 24, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: PSTools

The PSTools suite is one of those things that you’ll find new uses for every time you play with it. The PSTools suite was developed by Mark Russinovich who worked on the original NTFS file system, and hence has a rather unique insight into the inner workings of Windows systems.

The PSTools suite is comprised of the following utilities:

* PsExec – execute processes remotely
* PsFile – shows files opened remotely
* PsGetSid – display the SID of a computer or a user
* PsInfo – list information about a system
* PsKill – kill processes by name or process ID
* PsList – list detailed information about processes
* PsLoggedOn – see who’s logged on locally and via resource sharing (full source is included)
* PsLogList – dump event log records
* PsPasswd – changes account passwords
* PsService – view and control services
* PsShutdown – shuts down and optionally reboots a computer
* PsSuspend – suspends processes
* PsUptime – shows you how long a system has been running since its last reboot (PsUptime’s functionality has been incorporated into PsInfo)

While these tools work locally (and in most cases work better than the native Windows utilities, or provide functionality that is not available natively), they really shine when it comes to working with remote machines. If I had nothing else but a fresh (default) Windows install, I could probably continue to administer my network using the PSTools.

Notice I said nothing but a default windows install. Microsoft has done something rather unique with the PSTools suite (in fact with the entire Sysinternals utilities collection), and made them usable from a “live” website (to get an overview of what is available, just type \\live.sysinternals.com\tools into your browser’s address bar).

Now all these tools are stand alone executables (no need to install), so they can be run from a USB drive (SWEET!!!), however being able to run them without even having the executables on the machine is just awesome!

end

August 29, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: KeePass v1.x

Someone asked me today what tool I would say helps me most in my day to day job duties. Man was that a tough question to answer! I have about 30-40 tools that I use on a daily (or at least every other day) basis, so to pick one is like having to choose what finger you like best (no snickering back there).

I guess what it all comes down to is what tool I use most. Hands down that tool is KeePass Password Safe.

It’s hard to cover everything that KeePass does, but this quote from the official site does a better job than I can:

KeePass is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key file. So you only have to remember one single master password or select the key file to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).

I use KeePass more than any other tool in my Arsenal simply because I have so many passwords to remember.

One of the features that makes KeePass better than other password managers is that you can attach files to entries, which are then encrypted with the KeePass Database. I personally use this to keep all of our VPN keys handy so that when a user complains that they are having problems with their VPN, I can log in as them and see if it is in fact an issue with their VPN tunnel or just user error.

My absolute favorite feature though is its portabliity. Here is a short list of all the different platforms that KeePass works on:

* Windows
* Linux
* Mac OSX
* BlackBerry (huge score here as I love being able to access all my passwords from my phone)
* PocketPC and Smart Devices (including Windows Mobile 6.0)
* Symbian
* PalmOS
* USB drives (specifically portableapps.com)
* USB drives (U3 platform)
* PE environments (WinPE and BARTPE)

Pretty much anywhere you are likely to need it from. I specifically call out the 1.x versions as the 2.x ALPHA versions require the DotNET framework, and are not as portable as a side effect. No need to worry though, 1.x is still in active development, and is open source, so even if the current devs stop work on it, development will continue.

KeePass also has quite an extensive plugin library, which further enhances it’s functionality. If you’re looking for a password manager that you can use anywhere, you would be hard pressed to find one better at it than KeePass.

end

August 26, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: Notepad++

Ok, so anyone that knows me (or has dealt with me for anything technical that involves a text file of any kind) knows that I loathe Windows Notepad. If you are just going to write a quick couple lines of notes it’s ok, but anything beyond that, it’s just the wrong tool for the job. That’s where Notepad++ comes in.

Notepad++ is an open source text editor extraordinaire, making short work of even the most convoluted of text files with the greatest of ease. Here is just a partial list of the features of Notepad++:

  • Syntax Highlighting and Syntax Folding
  • WYSIWYG editor (if you have color source code, print it in color)
  • Auto Completion
  • Multi-Document (tabbed view)
  • Multi-View (view multiple documents at the same time)
  • Regular Expression Search/Replace supported
  • Full Drag & Drop support
  • Zoom in and Zoom out
  • Bookmark
  • Line numbering
  • Macro recording and playback
  • FTP support

And that’s not even all of the features!

However for me the best features are the syntax highlighting and the line numbering. Do you have any idea how easy it is to explain a (printed out) script to someone when you can just tell them, “and starting on line 324…”? It’s GREAT!!!

For this feature alone it’s worth the download, but it gets even better. There is a portable version! You don’t even have to install it, you can run it right from your USB drive (as I’ve mentioned before I am a big fan of having all the software I use on a daily basis on a USB drive)!

Anyone that has to regularly deal with text files will greatly benefit from the robust features of Notepad++.

Notepad++ can be downloaded from here.

Notepad++ Portable can be downloaded from here.

end

August 18, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet

Admin’s Arsenal: lsgrab.exe

Several months ago I found myself with a unique need; I needed to take screenshots of a remote machine at specified times during the day (don’t ask, it’s a long story filled with management douchebaggery). I did quite a bit of searching, and eventually settled on lsgrab.exe by Geert Moernaut.

This little gem is a console application designed to do one thing: take screenshots of remote computers.

There are a few caveats (but it filled the need I had):

  • It is NOT free. It is donation ware, the author requests a €5 donation (about $9 USD), however this is not stated anywhere before you download it (it’s in the readme file in the .zip download).
  • You must have administrative permissions on the target computer.
  • Someone must be logged on to the target computer.
  • Works on Windows 2000, Windows 2003, XP (I haven’t tested it on Vista or 2008 yet).

Since it’s a console app I just copied it into the C:\Windows directory on my workstation, and then wrote a script to use it to take timestamped screenshots (you can view the script I used here). Worked great. I’m not sure what other uses I might find for it, but for the $9 buy in, it is definitely something I will drop into my bag of tricks.

You can download lsgrab.exe here

end

August 11, 2008 Posted by Just Joe | Admin's Arsenal | | No Comments Yet