Wednesday, August 13, 2008

Log off fails while VMRCplus is running

I keep seeing event logs on one of the Windows Server 2003 boxes at a client which indicates that I tried to reboot or shutdown the box and the attempt has failed. Specifically, the following appears in the event log:

Event Type: Warning
Event Source: USER32
Event Category: None
Event ID: 1073
Date: 13/08/2008
Time: 16:28:33
User: DOMAIN\myaccount
Computer: SERVER
Description:
The attempt by user DOMAIN\myaccount to restart/shutdown computer SERVER failed

This has been bothering me for quite some time, and I finally discovered what's causing it. If I attempt to log off an RDP session (or perhaps a console session as well, I didn't bother testing that) while VMRCplus is running, the session does not log off and the log entry above is generated.

The reason I never noticed is that I use a custom MMC console with remote desktops for all server in the environment, so when I'm done I just log off, click the next server, log off, etc. and then close the console.

I'm going to contact VMRCplus' maintainer, Matthijs to let him know about this, although at this stage I'm not sure if VMRCplus is actually causing this itself. In the meantime I figured I'd post this here in case anyone else happened to experience the same thing. I've read through dozens of forum posts and blog entries without any of them shedding any light on the cause of the error. It's especially misleading since the error occurs when attempting to log off, but the description in the event log indicates a failed shutdown or reboot attempt.

If you haven't heard of VMRCplus and you are responsible for managing MS Virtual Server boxes, you should check it out, it's much better than using Virtual Server's web interface and the default Virtual Machine Remote Control Client.

UPDATE: Matthijs confirms that this is a known issue:

Correct. Some programs, like VMRCplus, prevent logoff while they are still running. This is caused by the ActiveX control embedded in VMRCplus.
There is no workaround for that other than closing the application before logoff or simply killing the application.



Sunday, June 1, 2008

Keep an updated local copy of all the Sysinternals tools with Sysinternals Live and SyncToy

If you spend any significant amount of time supporting Windows systems, you will probably have used one or more of the Sysinternals tools at some point. You may also know that they recently added the Sysinternals Live service, which allows you to run any of the tools directly from the web.

While it's useful to be able to run these tools directly from the web, I still like to keep a copy of them on my laptop, because you never know when you might need one when no Internet connectivity is readily available. Previously, I'd update the tools on my laptop as new versions became available, but because the tools are now available via a regular UNC path, I've configured one of my other favourite tools, SyncToy, to update the Sysinternals tools directly from the web with minimal effort.

This guide is written with SyncToy v1.4 in mind, which works on 32-bit Windows XP and Windows Vista. If you're running a x64 edition of Windows, you'll need to use SyncToy v2.0 Beta, which adds x64 support, along with other new features.

Installing SyncToy

If you are not already using SyncToy, you will need to download it from one of the links above and install it. Installation is straightforward, just note that it will install to your user profile by default, not to Program Files, so make sure you install it while logged in using your regular user account.

Configuring a new folder pair

SyncToy works with folder pairs. You select a "left" and "right" folder, then select the synchronisation type you want to perform between the two. There are a few types of sync you can choose from and these are well described in the SyncToy user interface, so I won't elaborate on all of them.

The process for creating a new folder pair is detailed below. I keep the Sysinternals tools in C:\Sysinternals on my laptop, you can adjust this as necessary. The sync type I use is "echo" which simply ensures that the "right" folder is an identical copy of the "left" folder.

Run SyncToy and click Create New Folder Pair.



In the Left Folder box, type the UNC path \\live.sysinternals.com\tools, click Next and for the Right Folder, browse to the folder on your machine where you want the tools to be synchronised to. Click Next.



Select the Echo option, click Next.



Give your folder pair a name and click Finish.



Synchronising the tools from the web to your PC

Now that you have defined a folder pair, you can synchronise the tools by clicking the Run button.



After a short while you should see the screen below and your Sysinternals tools will be updated to the latest versions.



Keeping the tools updated

To keep your copy of the tools updated, all you need to do is run SyncToy every so often, select the folder pair you created and click the Run button again. You can also schedule SyncToy to run on a regular schedule, although I haven't bothered doing that at this stage. If you want to go ahead and do that, click on the SyncToy's Help menu and click Learn How to Schedule SyncToy.