Shutdown Event Tracker

I have dual-boot installation of Windows Server 2008 R2 in order to play with Hyper-V. I run it only occasionally and thus I am quite annoyed with shutdown event tracker. While I can understand benefits in normal scenarios, it is quite unnecessary for test installations.

Problem here is that there is no obvious check-box that would disable it. However, Group policy comes to rescue.

Open Start menu and select Run (or hit ) and type gpedit.msc. Press OK and that should open Local group policy.

Go to “Computer Configuration” > “Administrative Templates” > “System” and on right side you should see “Display Shutdown Event Tracker”. It’s common state is “Not configured”. That configuration will cause server OS (Windows Server 2008 R2) to display it while client OS (Windows 7) will not.

Setting this value to “Disabled” removes this annoyance.

Creating Location-Aware Applications for Windows Mobile 6.5 Devices

Illustration

I gave presentation at Mobility Day 2009. Since I was traveling from Berlin this morning (started at 5:00) I was quite tired, but presentation went mostly fine.

As promised, here is code download:

There are few prerequisites:

  1. Your emulator needs to have Internet connection.
  2. You need to have GPS support in Windows Mobile emulator. FakeGPS will do.
  3. Do not forget to put your Bing Maps user ID and password in Program.cs. If you do not have developer account, you will need to request it.

P.S. As a bonus, download also contains desktop application that speaks with Bing Maps. It is much faster to test various setting this way.

P.P.S. NMEA stands for National Marine Electronics Association and not, as I said, “Nautical something”. :)

Programming With Remote Assistance

Illustration

I needed to do some programming on other PC and Remote Desktop was obvious solution. However, since it wasn’t my computer, I felt uneasy doing something while other person could see it. Next best choice was Remote Assistance.

If you intend to write code via Remote Assistance be aware of some issues:

1. Mailing invitation doesn’t work every time.

For some reason, mail invitation works in aproximatelly 50% of cases. I could blame corporate firewalls and proxies, but it seems to me that, if you are going to have such feature, you need to anticipate those problems.

2. You need to work in window.

For some reason, you cannot go into full screen in order to see other side. You will stay in window and, since there is chat window and some status around, destination needs to be a lot smaller. My home resolution was 1280x1024 and I could manage only 800x600 on other side. Second solution would be to scale window, but it is very hard to program if all you see is bunch of pixels.

3. Escape key is used for disconnect

Every time you hit escape key, you will disconnect remote control mode. In order to continue working other side will need to approve you again. And again. And again. If you are used to close windows with escape key (e.g. Intellisense windows), you will disconnect a lot.

Reasoning behind that “feature” was understandable. Allow user to disconnect at any time if he/she sees suspicious behaviour of repair-man. However, that does not explain why it disconnects when remote side hits escape button also. I doubt that there is scenario when remote side wants quick way out - especially mapped to escape key.

I did solve it after ten or more disconnects. I took screw driver and popped it out.

Conclusion

While I cannot say that I enjoyed this much, it was enough to get job done. I assume that with this solution it is as good as it will get.

Disabling Password Complexity Requirements on Hyper-V Server 2008 R2

Illustration

Microsoft’s Hyper-V Server 2008 R2 is a great product. It is free, it has small disk footprint (< 4 GB) and you can control every aspect of it from another computer with Management Console. Or to be more precise, every aspect except for one.

If you decide to make standalone Hyper-V Server install (without adding it to domain), you have small problem with password selection. Every password needs to pass complexity requirements. While those requirements are not too harsh, they are quite annoying if all that you want to make is test installation with your common password (and everybody has one of those).

Everybody who installed Windows Server knows solution - just use Local Security Policy. It will not work here since MMC is not supported on Hyper-V Server 2008 R2 and Local Security Policy is probably only MMC snap-in that cannot be used on remote computer.

Rescue comes with secedit.exe. Whole purpose of this command is to export and import security policies, but in unfriendly manner.

First step is to export our current policy:

secedit /export /cfg X:\new.cfg

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.</pre>I would recommend putting this file on USB or network drive since Hyper-V Server 2008 R2 doesn't include unicode text editor (notepad.exe works only with ANSI). Once you do manage to open file in normal editor, you will be presented with good old INI format. We are interested in PasswordComplexity value within [System Access] section.
[System Access]
MinimumPasswordAge = 0
MaximumPasswordAge = 39
MinimumPasswordLength = 0
PasswordComplexity = 1
PasswordHistorySize = 0
...

Value should be changed to 0 in order to disable complexity check.

After this edit, it is time to go back to our server and perform configuration:

secedit /configure /db C:\Windows\security\new.sdb /cfg X:\new.cfg /areas SECURITYPOLICY

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.

There are no restrictions on location of your security database, but I like to place it in C:\Windows\security. It seems like logical location to me.

Areas parameter controls which security areas will be configured. While one could import all areas with this, there are two reasons why this should be avoided. First reason would be that, by default, you cannot import everything - Hyper-V server will return error since some settings are non-existent there. Second one is just plain common sense. Why would you risk stability of your system by importing stuff that you never intentionally wanted to change?

Once this operation is completed, you can press and change password to whatever you wish.

VHD Attach 1.00

Illustration

This is small tool that adds Attach and Detach option to contextual (aka right-click) menu of Virtual disk (vhd) files. That enables those operations to be done without trip to Disk Management console. Detach option is available on hard drive contextual menu also.

Additionally program can be used as classic utility in order to see various information about virtual disk, even without attaching it.

Do notice that this program only works with Windows 7 and Windows Server 2008 R2. Older operating systems are not supported.

As always, this program is freeware.