April 2004 - Posts

nGallery v1.6.1 released!

nGallery v1.6.1 is now available for download!

Visit the nGallery site at http://www.ngallery.org to download!

[Ken Robertson]

Cool I’m now going to have to spend some time updating my nGallery install.  If you are in need for an online photo gallery I would highly recommend you check out nGallery.

Posted by puzzlehacker | with no comments

Ditigal Camera Reviews

This semester I'm taking a digital picture processing class at Virginia Tech and my professor pointed me to http://www.dpreview.com.  If you are in the market for a new digital camera I highly recommend checking out this site for very detailed reviews of a ton of digital cameras.  About a month ago I bought a new digital camera, a Cannon Powershot S50, but of course I didn't know about this site at that time luckily after checking its review at dpreview it seems to rate pretty good so I'm happy. 

Photo Gallery

I have create a photo gallery using nGallery, its an open source ASP.NET web application.  If you haven't looked at it yet please do it is a very nice application.  There are still some things that need to be improved but all in all it serves my needs. 

For anyone who maybe interested in see what my wife or I look like take a look http://haggards.us/photos/.  We have posted some pictures from some recent trips and plan to keep it up to date with any new pictures that we take with our new Digital Camera (Cannon Powershot S50).

Posted by puzzlehacker | with no comments

Customizing Windows Run Command...

If you are like me you use windows run command all the time.  I hate using the mouse to point and click a shortcut on the start menu.  WIN-R are probably the two most over used keys on my keyboard.  After thinking about if awhile I hunted down how the run command works.  It turns out that it makes a call to ShellExecute, which I guess is not too surprising.  The next thing I wanted to find out was exactly how the commands are resolved. The following is an ordered list of how they are resolved ([1]):

  • The current working directory
  • The Windows directory (no subdirectories are searched)
  • The Windows\System32 directory
  • Directories listed in the PATH environment variable
  • The App Paths registry key

Naturally the next thing I wanted to do was customize existing commands or add new commands so I do not have to type as much (standard lazy approach).  After examining my options which were to put the executable in one of those paths (since it only locates executables and not shortcuts), modify the path environment variable or add a key to App Paths. The App Paths option seems to be the easiest and most flexible to me.  Here is a layout of what you need to do to add an App Paths entry ([1]):

HKEY_LOCAL_MACHINE
    SOFTWARE
        Microsoft
            Windows
                CurrentVersion
                    App Paths
                        file.exe
                           (Default) = The fully-qualified path and file name
                           Path = A semicolon-separated list of directories
                           DropTarget = {CLSID}

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. I cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

The minimum needed to add a new entry is to add the key file.exe where file is the string you want to type into the run command and to add the Default entry which is the fully-qualified path to the file you want to execute. Note that even it the file you are going to reference isn't an exe file you still need to put the .exe on the key. Here is a sample registry file that I created to add a shorter keyword for Internet Explorer:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ie.exe]
@="C:\\Program Files\\Internet Explorer\\iexplore.exe"

After entering that entry into the registry I can simply type “ie” at the run command to open internet explorer.

Here is a list of some common commands I use at the run command:

  • cmd – Command prompt
  • winword – Microsoft Word
  • excel – Microsoft Excel
  • outlook – Microsoft Outlook 
  • iexplore – Internet Explorer
  • firefox – Mozilla Firefox
  • notepad – Notepad
  • compmgmt.msc – Computer Management Console
  • control appwiz.cpl – Add/Remove programs dialog
  • mstsc – Microsoft Terminal Service Client
  • regedit – Registry Editor

If there is some program that I find myself using all the time I figure out what the run command is for it and if there is not a short easy one I add one to my App Paths as described above.  Does anyone else have some other common run commands they use?

 [1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_perceived_types.asp

Javascript UP Bookmarklet

Sometime last June I posted about a Javascript Bookmarklet that lets you move up one directory level.  I had a comment from a user about allowing it to dig into sub-domains when it was at the root.  So I have revised it to allow for this as well as fixed some other bugs that were in it. 

I did some basic testing (by no means exhaustive) on IE 6 and FireFox 0.8, and it seem to work pretty good so I figured I would post it here incase anyone else wants it.

javascript:var m=location.href.match(/(.+:\/\/)([^\.]+\.)((?:[^\.\:\/]+\.)*(?:[^\.\:\/]+)(?:\:\d+)?)(?:(\/(?:[^\/]+\/)*)(?:[^\/]+\/?))?/); void(location.href=m[1]+(m[4]==null||m[4]==""?m[3]:m[2]+m[3]+m[4]));
UP

Posted by puzzlehacker | with no comments
More Posts