When you open a list (.cil) in Volume Activation Management Tool (VAMT) 2.0 on a Windows 7-based computer, you may receive the following error message:
An item with the same key has already been added.
This problem may occur if there are multiple network adapters in the computer, and these networks adapters have the same MAC address. For example this problem may occur if you have two network adapters for a virtual machine, and you configure these network adapters to have the same MAC address.
If you open the .cil file in this situation, you see an entry that resembles the following:
To have us delete the duplicate entries from the .CIL file for you, go to the "Fix it for me
" section. If you prefer to delete the duplicate entries from the .CIL file yourself, go to the "Let me fix it myself
Fix it for me
To fix this problem automatically, click the Fix it
button or link. Then click Run
in the File Download
dialog box, and follow the steps in the Fix it
- Please select a .CIL file which you want to delete the duplicate entries for.
- The Fix it solution does not work if the VAMT(Volume Activation Management Tool) 2.0 is not installed in the default path.
- This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
- If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.
Then, go to the "Did this fix the problem?
Let me fix it myself
To work around this problem, manually delete the duplicate entries from the .CIL or to automate this process, use the following source code to create a
Powershell script to automate.
$cilFilePath = Resolve-Path $inputFilePath;
Write-Error "Expected input file name of target CIL";
$vamtDirPath = Resolve-Path $vamtDirPath;
$prograPath = [environment]::GetEnvironmentVariable("ProgramFiles(x86)");
if (!$prograPath -or $prograPath -eq "")
$prograPath = [environment]::GetEnvironmentVariable("ProgramFiles");
$vamtDirPath = $prograPath + "\VAMT 2.0"
$assembly = [System.Reflection.Assembly]::LoadFile($vamtDirPath + "\Vamtrt.dll");
Write-Error "Error while attempting to load VAMT assembly. Provide the correct path to your VAMT installation if VAMT is not installed to the default directory.";
$fileSerializer = new-object Microsoft.SoftwareLicensing.Vamt.FileSerializer($cilFilePath);
$softwareLicensingData = $fileSerializer.Deserialize();
for ($i = 0; $i -lt $softwareLicensingData.Machines.Length; $i++)
$machine = $softwareLicensingData.Machines[$i];
if ($machine.MacAddresses.Count -gt 0)
$distinctMacAddrs = new-object System.Collections.ObjectModel.Collection[string];
foreach ($mac in $machine.MacAddresses)
foreach ($distinctMac in $distinctMacAddrs)
Then, follow these steps on a Windows 7 computer:
- Copy your saved .CIL file to c:\script. For example c:\script\saved.cil
- Copy the included source code from this KB article into the clipboard
- Click Start, All Programs, Accessories, Windows Powershell, "Windows powershell ise"
- In Windows PowerShell click in the Untitled1.ps1 window
- Paste in contents of the script from this article
- Click File, save as, c:\script\ScrubCil.ps1
- Click Start, All Programs, Accessories, Windows Powershell, Right click "Windows powershell" and choose "Run as Administrator"
- At the powershell prompt type the following commands
Did this fix the problem?
- Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support
- We would appreciate your feedback. To provide feedback or to report any issues with this solution, please leave a comment on the "Fix it for me
" blog or send us an email