Tools for getting things done and other stuff.



PowerShell and iTunes

February 20th, 2008 bruceatk

PowerShell is Microsoft’s CMD.exe replacement. It is a very powerful shell that does an excellent job of bridging the gap of the DOS command line, COM objects, vbscript, and .NET. It is hard to describe it’s capabilities. You really have to experience it for yourself and have your own epiphany.

For my first PowerShell script I decided to replace the combo batch file and javascript file that I currently use to load all of the podcasts that I subscribe to into my iTunes. The old way was to run the batch file which scanned a folder and all subfolders looking for files with the archive bit set. For each file that it found it would then call the javascript file, which would load the one file into iTunes. The whole process was kind of crude. It would load any file modified in that subfolder. The files would sometimes include jpg or pdf files or even partial downloads.

Using Powershell I was able to easily include in one script the recursing of the folder structure for files with the archive bit set, selection by file extension, and calling the iTunes COM object api. It works quite well.

I basically have a server that runs Juice 24 hours a day collecting podcasts. When I get ready to synch my iPod I just run the PowerShell script and iTunes is updated. I have smart playlists that automatically organize the podcasts when they are loaded.

Here is the powershell script for anyone that wants it: AddPodcastsToiTunes Powershell script

Posted in PowerShell, Utility, Vista, XP | No Comments »


VB .NET 2008

December 22nd, 2007 bruceatk

On Dec 12th I went to the Visual Studio 2008 Installfest in Waltham, Ma. By going there I got a free copy of Visual Studio 2008 Professional. Some of the new features may have me revisting Visual Basic .Net. I always wish they had called VB .Net something different. It is so different from VB 6.0 and it is so much work to port a VB 6.0 application to VB .Net, that I have always considered it a different language and haven’t had any reason to actually use it.

I have been impressed with the overall improvements of Visual Studio 2008 and the additions to VB .Net. It’s too soon to tell, but VS 2008 may become my primary development environment going forward. It still takes way too long to install, but it went off without a hitch. The first time you run it the startup time is slow as it does some configuration. After that it fires up really fast, even on my AMD Athlon 3200 XP (32 bit). It only takes about 3 seconds to start.

I did try converting a few VB 6.0 apps that I have always thought should have been easy to convert and it still isn’t able to convert them. The changes required after converting make it too much of a hack for me to consider actually converting an existing project It looks like I will still have to keep a working copy of VB 6.0 around for quite a while. At least until they get rewritten in some other language. I currently have been rewriting them in PowerBasic or RealBasic as the need comes up to make significant changes.

Posted in .NET, VB .Net | No Comments »


Vista - After 3 months

December 22nd, 2007 bruceatk

For the last 3 months I have been using Vista exclusively on my home desktop and laptop. After turning off Superfetch I have not experienced any slowdowns or odd behaviour. The various patches that have come out for Vista have made it where I can play FSX and MX vs ATV Unleashed without issues even though I was unable to when Vista first came out.

My normal memory consumption with Superfetch and UAC turned off is just under 1 Gig. Playing games puts me over the 1 Gig mark. I recommend that for typical use that 1 Gig of memory is sufficient and then depending on what applications or games that a person uses they may need to increase their memory.

The biggest quirks that I have had to deal with are installation programs that were written before Vista. Some applications can’t deal with the fundamental changes that were made with Vista in the relocation of the application data directory and the restrictions placed on writing to the “Program Files” directory. I even have one game that refused to run because it requires DirectX 9 and DirectX 0 isn’t sufficient. For some reason it trims the DirectX 10 to a zero. Telling it to run in compatibility mode fixes that one.

A program that I have for my Pocket PC would error out during the install because it couldn’t find ActiveSynch. The company said I needed to upgrade to the latest version. The funny part is that PC version of the program works fine under Vista and if I manually installed the program to my Pocket PC (copy the cab file and then run it on the PPC) it still worked fine and would synch using Windows Mobile Device Center without problems. When I asked the vendor how to install it they would only tell me that I needed to upgrade to the latest version. It was the only Pocket PC application that I have that wouldn’t install under Vista. I was surprised the vendor didn’t have a description of the manual method to install their application on their website. I won’t be purchasing from that vendor again.

Posted in Vista | No Comments »


Vista, MS Developer Tools, ReadyBoost and SuperFetch

September 27th, 2007 bruceatk

Even though my desktop has been heavily upgraded over the years, my XP system partition hasn’t changed since it was first installed. I have never re-installed XP. I was tri-booting XP, Vista, and Ubuntu. Spending most of my time in XP. A couple of things made me decide to finally pull the plug and start clean. I pulled my 3 drives from my system and put them in USB enclosures. I then installed a single 320 gig HD. I decided to go with Vista and not install XP.

My system is an Athlon XP 3200 with 1.5 gig of ram. I’m holding off on upgrading my system a little longer because my next upgrade is going to involve me having to buy a PCI Express video card. I’m perfectly happy with my BFG AGP card. My system has always been responsive in XP but with Vista it seems like a dog. On the other hand my laptop with a Core 2 Duo cpu and 2 Gig of ram seems to run Vista just fine most of the time. Even so it still has it’s random performance hiccups.

With determination to get Vista performing well on my system, I started my long ordeal of installing software. First up was Visual Studio 6. I needed to install VB 6. Microsoft should be ashamed with how they have treated their developers. You would think that Vista would support all of MS’s developer tools right out of the box. When  you install VS 6 on Vista you get a message to get online help.  All you get is saying that C++ has incompatibilities and to contact Microsoft. I can live with just VB 6 out of VS 6, but it seems that there are problems with installing the VS Service Packs. I was able to get SP 6 and install it without too many problems.

Most people would say don’t install VB 6, but I still use it and need to, because MS did such a terrible job on creating VB .NET as the next version of VB. They should have used a completely different name for the product and just said that they were abandoning VB. It is not worth the effort to convert existing VB 6 apps to VB .NET.

You would think that VS 2005 would be just fine on Vista, but it isn’t. You get the same dialogs warning about it’s incompatibilities. This wouldn’t bother me so much except for two things. The time it takes to install and the problems during the install. There are service packs available, but you can’t put them on until you have installed VS 2005. The install for VS 2005 takes a long time. The VS help portion wouldn’t install because I had moved my documents folder to a network drive. I had to figure that out, move my documents folder back locally, install VS Help, and then move it back to the network drive. The informative error message was “invalid drive f:\”. I couldn’t find someone with a similar problem so I had to figure it out.

I thought that Visual Studio and MSDN took way too long to install. I have 1.5 gig of ram and a 2 gig USB using ReadyBoost. I didn’t see any improvement using ReadyBoost. I actually thought the system was slower. I noticed while installing that Vista was always starved for memory as the SuperFetch consistently seemed to fill my memory with stuff I wasn’t using and didn’t leave any room for the stuff that I was loading.

I then installed the Service Packs, the first was taking forever to get to the point where it actually would start installing. I noticed on the web page that I was launching it from that it said if you have UAC enabled that it could take an hour of more while it verified all the certificates. I had been trying to see if I could live with UAC and I decided right then that I couldn’t. I turned off UAC and retried the service pack for VS2005. It still took a long time but was much faster than with UAC on. The VS service pack update for Vista also took a long time.

It took so long to install Office 97, Office 2003, Office 2007, Visual Studio 6, and VS 2005 I was starting to wish that I had just installed XP. I then started testing out my system in this configuration. I didn’t like how it responded. It seemed sluggish compared to my system running XP on a badly thrashed system disk. I started looking at my memory usage and you can’t really tell what your memory usage is. I knew from XP that my max memory consumption was right at 1.5 Gig. I had no idea what my memory was in Vista, but I could tell that the SuperFetch was randomly accessing my harddisk at times that I really didn’t want it to.

I did some research and found some comparisons that showed slower performance using ReadyBoost. It seems that ReadyBoost is really designed to decrease the performance hit of a memory starved system and not really something to improve performance. Circuit City had a sale on memory so I opted to upgrade my system to 3 Gig. I knew I would need it to keep Vista and Flight Simulator X happy.

Knowing I had enough memory I removed my ReadyBoost USB drive and booted up. I didn’t do anything after rebooting. I just watched my memory consumption and I noticed that my system’s memory crept up to the point that I had hardly any free. I have several different usage profiles and I prefer that what is in my cache is stuff that I’m currently working on and that I have plenty of free memory available when I start to do something that I haven’t done before or rarely do. I started looking around for performance tips for Vista and I saw a tip on turning SuperFetch off. I was looking for ways to tune it, but off sounded good to me.

I turned SuperFetch off and rebooted my computer. The first thing that I noticed was that my system was more responsive without ReadyBoost and SuperFetch. I tried a few things and then checked out my memory consumption. After about 30 minutes of using my computer I still had 2 Gig free. Some people will say that is 2 gig wasted. I know that it isn’t. It actually is sitting there ready and waiting for me to use it when I need it. It will then be immediately available without Vista having to find a home for or throw away all the crap that SuperFetch has stuck in my memory.

I believe for some scenarios SuperFetch makes sense. The way that I use my computer it doesn’t at all. If MS decides to give me the option of tuning it by identifying applications to cache, excluding applications from the cache, and the ability to set the size of my free memory pool then I would turn it back on.

I have been using my freshly upgraded system for about 2 hours, with no noticeably hiccups in performance. In the two hours, I haven’t had one need to go to task manager to see what was making my system slow. I still have 1.9 gig free. I’m anxious to try my laptop without SuperFetch. I believe that the reason that my laptop has never felt as sluggish in Vista as my desktop is because of the dual core cpu.

Posted in .NET, Performance, VB Classic, Vista | No Comments »


FileMon - The Swiss Army Knife of Utilities

August 23rd, 2007 bruceatk

FileMon is a utility by Sysinternals. It is simple and easy to use and may help get you out of bind when you don’t know why you are getting an error message. It is amazing how many different problems this utility will help solve. You can read more about Sysinternals utilities here.

Last fall I used FileMon to help us solve a perplexing problem. We had an important piece of software that wasn’t performing well, so they upgraded the workstations that it was running on. Even though the workstations were now more than powerful enough, they would still pause and miss collecting some of the important data that they were collecting. The vendor wasn’t any help, and the users were losing faith in the software.

I figured I would just sit down and monitor the software using Regmon and Filemon. As I watched the application it became obvious to me that it was looking for a file called none.wav. One of the things that happens when you look for a file that doesn’t exist, is that each folder in the path is searched. If you have large folders, or folders on a network drive, and folders on a network drive that is on a server on the WAN somewhere, that search can take a while. It might even cause the system to hang a little while the search is going on.

The application had the ability to play sounds to alert you when an event occurs. If you didn’t want to hear a sound that event was set to “none”. This caused the application to constantly search for the file none.wav. The vendor was unaware of this.

Creating a short silent file called none.wav and putting it in the application folder, stopped the constant searching and cleared up the problems we were having. A problem that had been researched for a long time without coming up with a solution was solved in a few minutes with Filemon.

Filemon
Regmon (like Filemon but for the Registry)
Process Monitor(FileMon and RegMon combined)

Posted in SysInternals, Utility, Vista, XP | No Comments »


Broken Send To Desktop - Doug Knox’s XP Fixes

August 18th, 2007 bruceatk

I frequently use “Send to Desktop” by right clicking on something and sending a shortcut to my desktop. Today I went to do it on my XP desktop and it didn’t work. This specific workstation’s XP has been resident since XP first came out and has been heavily upgraded (multiple motherboards and hard disks). I figured I was out of luck on getting it fixed. I did a search and found a great site containing a bunch of tips and fixes for XP. If you are still using XP it’s worth checking it out. Maybe you have something broken and don’t realize it.

There are so many little things like this that can drive you nuts and waste your time. I expected to end up on what I call a Star Trek mission. It’s when I end up taking many detours to find a solution and get carried completely away from my original intended goal. I hate when I’m looking for solutions to problems that have nothing to do with what I’m trying to accomplish. The sad thing is that it seems to be the norm when working on computers, especially your friends and relatives computers that seem to have so many things wrong you don’t know where to begin.

It’s always nice to find solutions in just a few minutes. Thanks Doug for creating your site.

http://dougknox.com

Posted in Fixes, XP | No Comments »


AutoHotKey - The keyboard macro software that should come with Windows

August 14th, 2007 bruceatk

I have been living under rock as far as this software is concerned. My past experience with keyboard macro/playback software has left me tainted. I recently started using this as a way to automate some daily tasks that I do with “My Life Organized”. I soon learned that this is an extremely powerful tool that can be tailored by scripting to your precise needs. The more you use it the more you find things that you can use it for. It’s a must have tool, and it’s free.

AutoHotKey web site.

It is very useful in it’s most simplest implementation and as you become more comfortable with it it has the power to grow with you.

Posted in AutoHotKey, Utility | No Comments »


SmartStartMenu - Tame your “All programs” menu

August 13th, 2007 bruceatk

My main workstation has had Windows XP on it since it first game out. I’ve never had to rebuild it. So after several years my “All Programs” menu has become out of control. Each time I clean it up by organizing it with more folders, it becomes more difficult to find stuff as it gets buried in the mess.

Shaun Harrington has come to my rescue with his excellent product called SmartStartMenu. It’s main function is to give you a toolbar that allows you search all your programs. You can customize where it looks and how it behaves. I have mine search my desktop, my Start Menu, and a couple of other directories.

To use it, you just type some letters and it displays all the items that contain that text. On my system typing “Visual” brings up a list like this:

I use the option that highlights the most recently used item. It is so fast and easy to use. If you have a lot of stuff in your program menu or on your desktop then this utility will save you tons of time.

If that was all it did it would still be great, but it has a few other tricks. If you used the Send To option in Windows 95 PowerToys, then you’ll like that SmartStartMenu will add “Copy Pathname” and “Copy Short Pathname” to your explorer context menu. SmartStartMenu can be used as a replacement for the Run dialog. It is also easy to quickly navigate your folder structure on your hard disks.

Shaun doesn’t ask for any money for this utility. He does have a link that let’s you buy him a beer. So try it out and buy him a beer.

http://www.planetharrington.com/products/smartstartmenu/

Posted in SmartStartMenu, Utility | No Comments »


Maximize the use of your Clipboard with ClipCache Pro

August 10th, 2007 bruceatk

For a couple of years now I have been using a product called ClipCache Pro. This program saves everything that you put in your clipboard. You are then able to go back through ClipCache and re-paste it at a later time. You can create folders so that you can organize your clips. I just have few folders. I put some common code snippets in one folder. Another folder has some common items that I paste (ie. user names, server names, paths). You can give a clip a friendly name and the contents can be things you don’t like to type. I have another folder containing common answers or solutions that I have to use over and over again in e-mail or our help desk system. I like the fact that it puts my clips in a database that I have can locate on a network drive or even a flash drive.

I find it extremely useful when I have to create documentation, test plans, or installation instructions. I can just take the screen shots as I go along, without having to deal with them. I can then go back and include the screen shots in the document that I’m creating. It’s one of my “must have” tools. I always feel crippled sitting with someone else, helping them do something and they can only have one clip at a time.

I must say it is amazing what passes through your clipboard. After using it for a few months you will be amazed at all the things that you put into the clipboard.

Click screenshot for larger image:

Posted in ClipCache, Utility | No Comments »


Some examples of using Textpad’s Find in Files

August 9th, 2007 bruceatk

Many years ago I started using Textpad as a replacement for Notepad. I soon discovered several features that made my life so much easier. I now don’t know what I would do without them. I’d be interested in hearing if there are any other similar products that include these features. Both features that I will describe here involve the “Find in Files” functionality.

The first aspect of the “Find in Files” function is the fact that Textpad will display the results of the search and clicking on each line brings you directly to the file and place in the file that the search text is found. The file is opened in a new tab so the search is still available. Before 5.0 the search results ended up in it’s own tab. In 5.0 the search results ends up in a special window at the bottom of the Textpad window.

The example that I’m using is searching a Dr. Watson file for “when:”. This let’s you see the frequency of abends on a PC that is having problems.. This search will result in a list of abends with the date/time of each abend. Double-Clicking on one of the search result entries will bring you right to the start of the Dr. Watson entry in the log file.

Find in Files dialog:

Results of searching a Dr. Watson log file (click image below for larger image):

The second example is useful when you need to replace something in several text files that you know is unique and safe to change.

  1. Using the “Find in Files”, do the same as the Dr. Watson search above except, instead of giving a specific file name, use wildcards.
  2. Pick the top level directory of the files you want to search
  3. Check the “Search subfolders” option
  4. The search results will contain all the lines that contain the search text.
  5. Right-click in the search results and click on “Open All”.
  6. All the files named in the search results will open up in seperate tabs.
  7. Use the “Replace” option under the “Search” menu to identify what to replace. Click the “All Documents” option and then click “Replace All”.
  8. The text will be replaced in all the files.
  9. Under the “Files” menu click “Save All” and “Close All”.It’s easy and fast.

If you can’t quite get something unique across all files you can do it several times using unique search criteria that meets your needs. The nice thing about doing it this way rather than a command line tool is that you can easily see how good your search is and whether or not it’s safe to really do the “replace all” before actually doing it.

Posted in Textpad 5.0, Utility | No Comments »