Archive for Tools – Page 2

Script to see if a KB update has been installed on a computer

Often, when I am working on a workstation or server, I need to see if a particular KB update has already been applied (installed). Case in point: KB 2862330 was released in October as part of a set of USB/Kernel updates. Immediately there were reports of BSODs with Windows 7 and Windows 2008R2 systems.

Early investigation of this issue found that the BSOD could be avoided in most cases if KB 2533552 was installed prior to installing 2862330.

So, I found myself looking for a simple, easy way to determine if a KB update has been installed on a particular workstation. Gandlaf50 from the Spiceworks’ community forum posted a VB script solution. The script will ask you which computer to check, meaning you could run this from your workstation, and check another computer in your network.

  1. Download the script file to your computer
  2. Rename it from findkb.v_b_s to findkb.vbs
  3. Double click to run the script.
  4. Enter the KB number you wish to check (enter just the number)
  5. Enter the name of the computer to be checked
  6. A message box will display informing you if the KB is installed or not.


How to fix ANY computer

Yes, any computer – no matter if it’s running Windows, Apple or Linux.


Kudos to Matthew Inman at The Oatmeal for the great insight!

Review of ShareMouse Utility

This is my 3rd in a series of personal reviews of various “extend my mouse and keyboard” tools.

My office desk setup includes three 24” monitors connected to my Windows 8 desktop workstation (Dell Optiplex), plus a monitor on my Hyper-V 2012/SBS 2011 server (Dell T410), plus a Windows 8 touch-screen laptop (Lenovo) that I use for testing. And, when necessary, I have a 32” Samsung TV that I can attach using a USB multi-display adapter (Plugable’s Model UGA-2K-A).

So, being able to use one keyboard and mouse is an essential tool and a real time saver for me. (P.S. someday, if I can get the stuff on my desk cleaned up and put away, I’ll take a picture of my setup!)

Mouse Without Borders

In August 2012 I wrote about a product called Mouse Without Borders. I must say, it works very well. The only negative is that only works with Windows-based computers, so no Linux or Mac OS. They released an updated version in January 2013 that supports Windows 8/Windows 2012.


In May 2013 I tested a similar product called Synergy, which does support Windows, Linux and Mac OS computers. I used Synergy from May to August, and for the most part, the product worked fine. One nagging issue I had with Synergy was that whenever I needed to reboot my server or workstation, Synergy did not always sync up properly. The services start up, but I had to keep playing with it, stopping and starting the services, until eventually it was in sync and working. Very frustrating. Finally in August I reverted back to using Mouse Without Borders.



This week I came across a new product called ShareMouse (from Bartels Media GmbH) and just installed it to give it a spin. So here are some first day impressions.

  • First thing to note is that it is very, very easy to install. After downloading the install file you are 4 clicks away (OK, Next, Next, Finish)
    image     image     image
  • It has a very intuitive screen manager to identify the position of my monitors for proper mouse movement.
  • It supports both Windows 8 and Mac OSX 10.9
  • A simple, but very helpful, feature is that it dims inactive monitors, so you always know which computer you are working on
  • They offer a free version for personal use (two computers, two monitors)
  • The paid versions (standard and pro) offer ability to drag and drop files and folders between computers. They have enhanced the product so that you only need to install the license on just one computer in your group.
  • Comparison of their free, standard and pro editions

I will post a follow up on this utility after using it for a few more weeks.

Cleanup Log Files (Batch vs PowerShell)

Back in Nov 2006 I wrote a blog post on creating a batch command file that could be used to cleanup old IIS log files. Then, in Dec 2007, I wrote an updated blog post with another solution. I thought I would update those posts for 2013 using PowerShell.

OLD SCHOOL (Batch command file)

Both of the above solutions were written in the SBS 2003 era, but will work with SBS 2008/2011. Both versions will let you identify the number of days to keep (I suggest 30 days), and will scan sub-folders under the specified folder.

As a quick review, here’s how to implement my Dec 2007 solution:

  1. Download the zip file from my web site which contains three files: .vbs, .bat, and .log files.
  2. Extract and copy those three files to your desired directory. I normally use c:\scripts.
  3. Edit the .bat file to point to the appropriate parent folder of the log files to be cleaned up, and the number of days of log files to retain.
    For Windows 2008 R2, my .bat file looks like this:
  4. NOTE: If running this for the first time, you may wish to test drive the script, without actually deleting any files. To do this, edit the deloldfiles.vbs file and comment out the ‘file.delete’ line in the script by adding a single quote (‘) to the start of the line. If all works, go back and remove the single quote.
  5. After testing the script manually, all that is left is  to schedule the script to run on a weekly or monthly basis, as desired.

NEW SCHOOL (PowerShell)

While batch files are still supported in the Windows 2008 R2/Windows 2012 era, we need to start getting comfortable with using PowerShell scripts. I found a handy PowerShell script that does this from the Microsoft forum.

This script used the “start-transcript / stop-transcript” command to create a history log of files deleted.

  1. Download the PowerShell script file (deloldfiles.ps1) from my web site.
  2. Edit the script, as necessary, to point to the appropriate parent folder and the number of days to retain, and save.
  3. NOTE: the script includes a “–whatif” option that allows us to run the script without actually deleting anything. If the script appears to work as expected, then simply remove the –whatif option from the script. Be sure to leave the trailing brace } in the script.
  4. To run, right click on the .ps1 file and click ‘Run with PowerShell’
  5. After testing the script manually, don’t forget to schedule it to run on a weekly or mothly basis.

Finally, from the FWIW department: you should know that from a security point of view,
deleting IIS log files or other similar system log files, is not generally recommended.

Stop Java from installing other third party software

I don’t know about you, but I am tired of being tricked into installing additional third party software that I did not want.

Oracle’s Java is a prime example. It tries to get you to install their sponsors’ applications (Ask Toolbar, Yahoo Toolbar, McAfee,  Chrome, etc.) whenever you click to install the newest Java update. Yes, there’s a window that pops up allowing you to UNcheck those boxes, but come on … leave them unchecked by default, ad then let us decide if we want to install them.


I finally discovered a solution – there are registry settings that will block ANY of these sponsored applications from installing! I will give Oracle kudos for at least providing these registry settings, but it certainly is a hidden secret!


To make things easy, I put the two registry settings into a text file that you can download and install.

Please note that the download file has a .txt suffix, which will need to be changed to .reg before installing.

  1. Download file to your computer: disable-java-sponsors.txt
  2. Rename file to disable-java-sponsors.reg
  3. Double click on the file and it will update your Windows registry

If you want to test that it really works:

  1. Uninstall your current version of Java
  2. Go to the Java web site and select to install it again.
  3. Voila, the sponsored application window doesn’t even appear!

For those with a Windows server, you can use group policy to implement this for all workstations!

BSOD Utilities

Got a Blue Screen of Death? Want to know what caused it, so you can try to fix it?

Microsoft offers tools for reading dump files (KB 312563). But I have to admit, just trying to read through the steps necessary gives me a headache.

If you’re like me, you want a quick and easy process. If so, check out either of these two free utilities:

Both programs support Windows 32bit and 64bit operating systems, from XP through Win8, and Windows Servers (2003, 2008, 2012). Both versions come with a full install/uninstall executable.

I prefer NirSoft as it includes a zipped file version, that does not require any installation. So, I can access it directly from a USB drive or SkyDrive account. I can also use NirSoft to view mini-dump files of networked computers.

Resplendence free version is for home use only. Their PRO version ($35US) is required for business use, and to view dump files of networked computers.

Both companies offer other utilities which you may find useful for your environment.

image     image

Extend Keyboard and Mouse with Synergy

Last August I wrote about a utility called Mouse Without Borders, developed in Microsoft’s “The Garage”, that allows you to use one keyboard and mouse to control multiple computers. And the utility works very great.

That is, unless you also have Linux or Mac OS X computers which you also want to control with a single keyboard and mouse.

So, here comes Synergy which offers to extend your mouse and keyboard to all three environments. And did I say that it is FREE??


I decided to take it for a spin today, and I was quite surprised at how easy it was to install and run it. For this first effort, I only installed it on two Windows computers. At a later date I will post my efforts to include a Linux or Mac workstation.

My scenario: I have a Windows 7 x86 workstation with three monitors, and a Windows 2008R2 x64 server, running Hyper-V.


My mouse and keyboard that I wish to use is on my Win7 workstation. So I first downloaded the Windows 32-bit version of Synergy and installed it. I designate this as my Synergy “server”.


It then asks what type on encryption I wish to use. That’s a really nice feature as it does provide some protection from anyone trying to intercept your keystrokes. You have a choice of four (4) different encryption modes, or you can disable encryption. For purposes of testing, I chose to not enable encryption.

image   image

The only other step to do is to click on the Configure Server… button. You will have a screen where you can describe your setup, indicating in which direction the monitor for each of the other workstation(s) is located.

image   image   image



In this case, my second workstation (which Synergy refers to as a client) is running Windows Server 2008 R2 x64. I am also running Hyper-V manager on this server, so I decided to install the Synergy client to the Hyper-V parent, so I can control all of my Hyper-V guests.

So I download and install the 64 bit version of Synergy, and install it. This time, when it asks Server or Client, I’ll select “Client”. Then you need to tell the Synergy client the name of the computer that is the “Synergy “server”.

image   image

I thought I was all done, but my mouse would not move over to the monitor attached to my server. At first I thought it was a firewall issue, but turning off the firewall on the W2K8R2 server did not fix it. In fact, if you check the firewall settings, you will find that Synergy had automatically added the proper Inbound TCP and UDP rules.


I then checked Services, and discovered that the Synergy service had not yet been started.


After doing so, I immediately saw that Synergy was communicating between the two computers, and my single mouse and keyboard was now controlling both computers!


Space Monger is still alive!

A good (I.T.) friend of mine reminded me of a utility from the past called SpaceMonger.

What is Space Monger? It’s a free tool that gives you a graphical picture of your entire disk, with larger files and folders easily identified. The nice thing is that Space Monger does not need to be installed. The executable can be run from a thumb drive!

Here are two screen snapshots from my drive:

image     image

You can download Space Monger from my web site. The zip file includes the free version 1.4 executable and the ReadMe file.

The trick to using it, I was told is:

  • Run it with elevated permission (Run as administrator)
  • Always open the folders, and not any applications from within it.

If you’re looking for something a bit fancier, but still free, check out WinDirStat!

View Hidden Devices in Device Manager

By default, Device Manager (devmgmt.msc) does not provide the option to “Show Hidden Devices”. You’ve probably know the steps to enable this option:

  1. Open a command prompt in (Run as) administrator mode
  2. Type the following two commands:
    set devmgr_show_nonpresent_devices=1
    start devmgmt.msc
  3. Once Device Manager starts up, you can click View –> Show Hidden Devices

But if your working on a server and need to review the full list of devices, doing the above steps is not very productive. THere’s a way to set this option permanently, entering it as a system variable. Here are the steps for Windows 2008 R2, but the same variable can be created in other versions of Windows.

  1. Click Start
  2. Right click on Computer, then click Properties
  3. Click on the Advanced System Settings in the left frame
  4. Under the Advanced tab, click on Environment Variables…
  5. Click New
    For the Variable name, type:  devmgr_show_nonpresent_devices
    For the Variable value, type: 1
  6. Click OK

That’s it! Here’s a screen shot of the above process:


Now, any time you access Device Manager on this server, the Show Hidden Options will be available from the View options

DISM for Windows Server 2008 R2 (64 Bit)

DISM is a command-line Microsoft tool for Windows 7/8/2008/2012. DISM stands for ‘Deployment Image Servicing and Management’. If you do a search for dism.exe you will find many posts of people using it to reduce the size of their WinSxS folder, especially after installing SP1. There is a 32-bit and a 64-bit version of this tool.

The actual command to do this cleanup is: dism.exe /online /cleanup-image /spsuperseded

So, you are sitting at the console of a Windows 2008 R2 x64 server, and you want to run this utility. Chances are, you will try to use the dism.exe that is listed inside the c:\Windows\SysWow64 folder.

However, if you do so, you may encounter the following error message: Error: 11 You cannot service a running 64-bit operating system with a 32-bit version of DISM. Please use the version of DISM that corresponds to your computer’s architecture.


In order to run this properly, you need to go directly to the native system folder to run this tool on a 64 bit system. Here are the steps:

  • Open command prompt window as administrator (‘Run as’).
  • Change directory by typing: cd \windows\system32
  • Run the command: dism.exe /online /cleanup-image /spsuperseded

This will take about ten minutes to run. Please note that even after the progress bar reaches 100.0%, the tool has not finished running. Do NOT close the command prompt window until you get the message “The operation completed successfully”.


What is the result of running this tool? I ran this on a Windows 2008 R2/SBS 2011 server, and it reduced the size of the WinSxS folder from 10.8GB to 7.37GB.

image   image

Not very drastic if you ask me. Not with today’s disk sizes. However, if you are running out of disk space on your server system drive, this might buy you some needed room!