Clear all event logs

Here is a batch file to do so:




Disclaimer: run at own risk!

content of file:

for /f %%a in ( .\LOGLIST.TXT ) do WEVTUTIL CL "%%a"
timeout 30

or shorter:

for /f %%a in ('WEVTUTIL EL') do WEVTUTIL CL "%%a"
timeout 30

.net version detector

This tool will list the Installed .NET Framework packages on your machine.

Download original from the source or a local copy from here


convert an img file to a Virtual Box VDI

Use VBoxManage’s convertfromraw command as follows:

C:\Program Files\Oracle\VirtualBox> VBoxManage convertfromraw --format VDI [filename].img [filename].vdi

Mount the VDI as a hard disk.

Other options:

  1. Select a virtual machine by clicking its name in the VirtualBox window
  2. Click the Machine menu at the top of the VirtualBox window, and click Settings
  3. Click the Storage category in the Settings window
  4. Right-click in the storage tree pane, and click Add Floppy Controller
  5. Right-click the Floppy Controller device, and click Add Floppy Device
  6. Click the Choose Disk button in the prompt window that appears
  7. Navigate to the floppy disk image file (.IMG) on your computer and double-click it
  8. If that doesn’t work, try renaming the .IMG as .ISO and mount it.

resize windows that can’t

This utility will allow you to resize windows that otherwise can’t



caching and popups

The following will disable cache for e.g. popups:

[OutputCache(Duration = 0)]
public ActionResult PopupXYZ(string param1) { }

allow network sharing on windows 7 or 8 (if you experience trouble with it)

It’s sometimes quite tricky to to share connections between 2 windows machines.
If you have already looked into disabling your firewalls and it did not solve the problem, then try the following:

start – run – “regedit”

navigate to :

create or modify 32-bit DWORD: “LocalAccountTokenFilterPolicy”
set the value to: 1

alternatively, if you want to simply download the file that does this for you, here it is:






Microsoft.Practices.EnterpriseLibrary config errors

I had the following error:
>Cannot instanciate a default database in DataAccess.Common.GetDataReader – check your config file
An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly ‘Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0×80131040) (\src\MVC\web.config line 5)

I changed:

<section name=”dataConfiguration” type=”Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null”/>


<section name=”dataConfiguration” type=”Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data” requirePermission=”true” />

and problem resolved!

IIS Express

Running IIS Express without using WebMatrix

If you installed WebMatrix, you have IIS Express installed on your computer as a web server and you can use that to test the pages. You can run IIS Express from the command line and associate it with a specific port number. You then specify that port when you request .cshtml files in your browser.

In Windows, open a command prompt with administrator privileges and change to C:\Program Files\IIS Express. (For 64-bit systems, use the folder C:\Program Files (x86)\IIS Express.) Then enter the following command, using the actual path to your site:

iisexpress.exe /port:35896 /path:C:\BasicWebSite

You can use any port number that isn’t already reserved by some other process. (Port numbers above 1024 are typically free.) For the path value, use the path of the website folder where the .cshtml files are.

After you run this command to set up IIS Express to serve your pages, you can open a browser and browse to a .cshtml file. Use a URL like the following:


For help with IIS Express command line options, enter iisexpress.exe /? at the command line.

Displaying Items in a Listview with details view

Displaying Items in a Listview with details view


listView1.View = View.Details;
this.listView1.Columns.Add(new ColumnHeader() { Text = "move" });
this.listView1.Columns.Add(new ColumnHeader() { Text = "followed by" });
this.listView1.Columns.Add(new ColumnHeader() { Text = "score" });
ListViewItem lvi = new ListViewItem("e2-e4");
lvi.SubItems.Add("e7-e5 d2-d24 e5xd4");