Remove an assembly from the global assembly cache (GAC)

You can manage your global assemblies with the gacutil.exe which comes with Microsoft SDK. You can find this tool for instance in folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\".

This is an example about removing one assembly:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" /u Assembly.To.Uninstall

Outputdebugstring in .NET / Visual Studio / C# / WPF

In my old Delphi developer days I used OutputDebugString() to track problems or elapsed time.
In .NET you can use the System.Diagnostics.Debug class.

You have to run the project in debug mode.

Code Snippet
  1. private void ReadFirstFile(string filename1)
  2. {
  3.     StatusText = "Reading file 1";
  4.     Stopwatch watch = new Stopwatch();
  5.     watch.Start();
  6.     using (StreamReader file1 = new StreamReader(filename1))
  7.     {
  8.         while (!file1.EndOfStream)
  9.         {
  10.             sc1.Add(file1.ReadLine());
  11.         }
  12.     }
  13.     watch.Stop();
  14.     System.Diagnostics.Debug.WriteLine("Time spent reading file 1: " + watch.Elapsed);
  15. }

MSDN link: http://msdn.microsoft.com/en-us/library/6x31ezs1.aspx

Howto enable local dumps

Local dump creation is disabled by default. You can enable them creating a registry value:

Code Snippet
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
  4. "DumpFolder"="C:\\Users\\Username\\Desktop\\LocalDumps"

Newly created crashdumps will be saved into this “DumpFolder”.

Disable thumbs.db on network folders

Thumbs.db was created in Windows XP in every folder that contained picture files.

Windows 7 creates a central thumbache in your user folder.

But Windows 7 creates thumbs.db files while browsing network folders.

Here is a little howto to disable thumbs.db in Windows 7 browsing network folders.

  1. Open your registry editor.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\
  3. If key “Explorer” doesn’t exists create a key named “Explorer”
  4. In key “Explorer” please create a new DWORD 32 bit value named “DisableThumbsDBOnNetworkFolders” with value = 1
  5. Reboot your system

Another possibility:

  1. Download this packed registry file
  2. Unpack the archive
  3. Execute the unpacked registry file
  4. Reboot your system.

Convert dd (raw) image to VirtualBox vdi

Ensure that VirtualBox is installed and that the target disk has enough free space left.

Open command line and type:
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage.exe convertdd "D:\RawImage.dd" "D:\VirtualBoxImage.vdi"

These are the allowed switches:

VBoxManage convertfromraw
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]

WHS2011 DVD to USB

You need to install Windows Home Server 2011 from USB and you got a DVD only?

Therefore you can use the Windows 7 USB/DVD Download Tool:

  1. Create an ISO-image from your DVD. Therefore you can use http://www.chip.de/downloads/ImgBurn_17759472.html
  2. Download, Install and run Windows 7 USB/DVD Download Tool
  3. Install WHS2011 from USB