Friday, December 2, 2011

How to move an offline Outlook Data File (.ost)

Moving an .ost file to another hard drive is not intuitive.Brief summary:

  1. Close Outlook, open Mail in Control Panel.
  2. Disable Cached Exchange Mode for the account.
  3. Click Disable Offline Use on data file.
  4. Use the Browse… button to choose the new location fo the .ost file (you can move the old one to save time)
  5. Re-enable Cached Exchange Mode.

Read the detailed instructions here.

Friday, November 4, 2011

External USB hard disk drives not recognized after uninstalling Acronis True Image

AcronisTrueImage

Symptoms:

  • External USB drives / USB sticks are not recognized.
  • In the Windows event log a message similar to the following one appears:
    "The driver \Driver\tdrpman273 failed to load for the device"

Applies to:

  • Acronis True Image Home 2011/2012

Solution (found in the Acronis forums):

  1. Entirely remove Acronis True Image.
    (if you have trouble uninstalling it from the Control Panel, use the Cleanup utility provided by Acronis. Caution: This removes all Acronis products from your machine)
  2. From Acronis KB 14871:

(!) After using Cleanup Utility, it is strongly recommended not to reboot the machine, go to Start -> Run -> regedit, and verify that there are no snapman*, tdrpman*, timounter strings in the following keys:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318} -> UpperFilters and LowerFilters
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F} -> UpperFilters and LowerFilters

Good luck!

Monday, October 24, 2011

How to store credentials for automated logon in Windows Credential Manager via command line

Beginning with Windows Vista/Server 2008 you can add credentials to Credential Manager on the command line using Cmdkey.exe

Cmdkey /add:Servername /user:User /pass:Password

Thursday, September 1, 2011

Login to SQL Server 2008 (R2) as Local Admin

sqlserver2008logoJust because you are a local administrator does *not* mean that you have permissions to access/log into your SQL Server 2008 (R2).

However, you can regain access by starting the SQL Server instance in "single user mode".

All you need to do is to add -m; to the Startup Parameters box and restart SQL Server.

See also: How to: Configure Server Startup Options (SQL Server Configuration Manager) on Microsoft TechNet.

Monday, August 8, 2011

A better alternative to ILMerge

There's a great alternative to ILMerge available.

From the ILMerge homepage at MS Research:

A Great Alternative to using ILMerge

If you cannot use ILMerge because you are trying to merge WPF assemblies, then here is a great way for you to get the same effect, courtesy of Jeffrey Richter: embed the dlls you want to merge as resources and load them on demand! In many ways, this is a better technique than using ILMerge, so I strongly urge you to check it out, even if ILMerge is working for your scenario.

The alternative solution is part of Jeffrey Richter's book CLR via C# CLR via C#, Third Edition (Microsoft Press, 2010; ISBN: 9780735627048), you can read about it there:

http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx

How does it work?

It adds the required .DLLs as embedded resources to the primary .EXE file and uses AppDomain.AssemblyResolve to return the assemblies.

This is what Mike Barnett (the creator of ILMerge) says about it:

As the author of ILMerge, I think this is fantastic! If I had known about this, I never would have written ILMerge.

Many people have run into problems using ILMerge for WPF applications because WPF encodes assembly identities in binary resources that ILMerge is unable to modify. But this should work great for them.

Thursday, August 4, 2011

Wednesday, August 3, 2011

Event Log Error: SideBySide (Event ID: 33)

Side By Side error is caused by a Security UpdateYou are seeing an error like this in the event log?

Activation context generation failed for "C:\Windows\system32\conhost.exe". Dependent Assembly Microsoft.Windows.SystemCompatible,processorArchitecture="amd64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.7600.16816" could not be found. Please use sxstrace.exe for detailed diagnosis.

Cause: it's a known issue with a security update (deployed through Windows Update).

Try this: install Windows Server 2008 R2 Service Pack 1.

Monday, August 1, 2011

BOOTMGR is missing after Windows Server restart

After restarting a Windows Server I got this error message:

What an unplesant situation...

The following solution from the Binary War blog worked for me:

  1. Boot from Windows Server CD/DVD.
  2. Click Repair your computer
  3. Choose Command Prompt.
  4. Run x:\sources\recovery\StartRep.exe
  5. At the end of the repair process, the Wizard will ask to restart the machine (which will now hopefully boot normally).

Good luck!

Friday, May 27, 2011

Listing all members in an Active Directory group

Is it possible to find out if a user is part of an Active Directory security group?You can use the command line to list all members of an Active Directory group like this:

NET GROUP "group name" /DOMAIN

Alternatively you could also use the dsget command.

Monday, May 23, 2011

The End of Excel

I am truly not the first one to find out that the "end" of Excel…

… is at XFD:1048576

or: 16,384 columns and over one million rows.

Even Excel has an end...

(verified with Excel 2007 and 2010)

Sunday, May 22, 2011

.REG file to turn off the Shutdown Event Tracker

Wha tis the Shutdown Event Tracker?

It's this dialog box:

One of the most annoying dialogs on non-production servers...

Why is there a Shutdown Even Tracker?

Shutdown Event Tracker provides a simple and standard mechanism one can use to consistently document the reasons for shutting down or restarting the computer. This information is used to analyze the root causes of shutdowns and develop a more complete understanding of the system environment.
(Source: Microsoft KB 555541, Author: Soumitra Sengupta, MVP)

How do I enable/disable it?

You can use a registry key or group policies to turn it on/off.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Reliability

Name: ShutdownReasonUI
Type: REG_DWORD
Value: 0 = disabled | 1 = enabled

Download .REG file: DisableShutdownEventTracker.reg

Further information:

Monday, March 21, 2011

Get rid of Visual Studio Setup Projects as they will be discontinued in future

Visual Studio setup projects are dead. Not sure anyone will cry...Buck Hodges informs us that there will be no Visual Studio setup projects (vdproj) in future versions of VS.

Future versions of Visual Studio will not include the Visual Studio Installer project templates. To preserve existing customer investments in Visual Studio Installer projects, Microsoft will continue to support the Visual Studio Installer projects that shipped with Visual Studio 2010 per the product life-cycle strategy. […]

Related Links:

Monday, March 14, 2011

How to Remove Windows Server 2008 R2 Serivce Pack 1 (SP1) Backup Files

Clean your system after applying Windows SP1Warning: As a result of removing the backup files you will not be able to uninstall SP1 anymore.

Steps:

  1. Make sure the "Desktop Experience" is installed.
    (Note that if you need to install it, it requires a restart and it takes some time to install on the next boot)
  2. Run "Disk Cleanup" (cleanmgr.exe)
  3. Click on "Clean up system files"
    How to remove the backup folder of SP1
  4. Select "Service Pack Backup Files"
    This is the only official way to delete SP1 backup files
  5. Click "OK" to start the cleaning (it can take quite some time, but will give you ~ 1-2 GBs)

Wednesday, March 2, 2011

Sending e-mail via command line

using SendMail.exe

Easily send mails and test SMTP connections using the command line

Download: SendMail.exe (ZIP)

How to assign "Allow log on locally" rights to a Domain Controller

Schloß

The Microsoft Knowledge Base has an answer (KB 234237):

  1. Run mmc
  2. Add Group Policy Management snap-in
  3. Browse to your domain, right-click and click Edit
  4. Open the path Default Domain Controllers Policy\Computer Configuration\Windows Setting\Security Settings\Local Policies\User Rights Assignment
  5. Edit Log On Locally settings

Tuesday, February 8, 2011

Using Host Headers in IIS7 / Why is the host headers text box disabled?

Cannot enter host headers in IIS 7If you want to run two sites on the same port you will need a Wildcard Certificate. Eath site will be assigned a different host header (= URL) in IIS (e.g. site1.yourdomain.com and site2.yourdomain.com).

What if the host name text box remains disabled although I have a Wildcard certificate?

The friendly name of the Wildcard certificate needs to start with an "*" (e.g. *.yourdomain.com) as you can read here.

You can still use the command line though to set the host headers appropriately.

Tuesday, February 1, 2011

How to grant permissions to the Network Service account of another machine?

  1. How to reference Network Service of another machineCreate a security group in Active Directory
  2. Add the computer account to the group (DOMAIN\MACHINENAME$)
  3. Grant permissions to the newly created security group.