Topic: Get Windows installation ID

Is there a way to use the agent to get the installation ID?
Same info that can be obtained in CMD by using slmgr /dti.

Thanks.

Re: Get Windows installation ID

Hi andreiv3103,

after I took a look at the slmgr script, I found we can obtain the information with the following command:

wmic path SoftwareLicensingProduct where "PartialProductKey!=NULL" get OfflineInstallationId

Actually, in FusionInventory::Agent::Task::Inventory::Win32::License module, we are still looking to SoftwareLicensingProduct WMI objects. By the way, we are not looking at "OfflineInstallationId" and even we are just skipping the object looking like "Operating System" in its Description field.

So actually, the agent doesn't get this information. But this would be easy to add such information.

Can you explain us your purpose ? Why would you need this information and where would you like to see it in GLPI ?

Re: Get Windows installation ID

Sure.

I use MAK keys to activate Windows. I manage those keys with VAMT 3.1 (a Microsoft tool) to avoid losing activation on re-install.

I don't know if you worked with MAK keys. These are keys that have many activations but you lose one activation each time you use it, even if you activate the same computer.
So to avoid this, the VAMT tool actually stores the Installation ID and the Activation ID received from Microsoft. So the next time I have to reinstall the same computer, VAMT just applies the Activation ID and so activates the computer offline.

The problem is that VAMT is slow and it drives me crazy. So I would prefer to use it only for the first activation on a new computer, save the ActivationID and use my own script for any subsequent activations. I am going to create a database with InstallationID - ActivationID pairs and use a script to search for the IID and activate using the AID.

And that is where Fusioninventory could be very useful: helping me collect the Installation IDs.

Re: Get Windows installation ID

Indeed you would be able to create a Collect task with a wmi collect request, setting "SoftwareLicensingProduct" as class and "OfflineInstallationId" as Property. Btw it seems the server will only keep the property of the last object... which is often empty for the class.

Here I think we have a bug for which you can open an issue.

I tested myself and I'm still not sure if the agent should be fix to provide separated values or if the plugin should be fixed to handle a collection of properties.

Btw I saw we can't ask for more than one wmi property so actually the Collect task in the WMI case should only work for classes with only one element.

I think I understand your need and I think the Collect task should answer it (if it was not buggy).