Product Key Report
How can I create a report to show the Computer name plus application and Product Keys?
-
Corey,
That's an excellent question. Unfortunately there isn't yet a great answer. The problem is that there isn't a 1 to 1 correspondence between Applications and Product Keys which makes it tough to join them together. We have some plans to help with this in the future, but for now you'll need to create an SQL report to get what you want. As long as you're very specific about what you're looking for you can get pretty close. Here's an example SQL which will give you Office 2010 and 2013 with their product keys. You may see some keys duplicated because there are so many Office editions and add-ons that can clutter up the results.
Copy and paste the SQL to a new SQL report, or import the attached file. Let me know what you're missing and I can help you get the right query.
select
Computers.Name as "Computer Name",
Applications.Name,
ProductKeys.Key
from Computers
join Applications using (ComputerId)
join ProductKeys using (ComputerId)
where <ComputerFilter>
and Applications.Name like '%Microsoft%Office%2013%'
and ProductKeys.Vendor = 'Microsoft'
and ProductKeys.Product = 'Office'
and ProductKeys.Version = '2013'
union
select
Computers.Name as "Computer Name",
Applications.Name,
ProductKeys.Key
from Computers
join Applications using (ComputerId)
join ProductKeys using (ComputerId)
where <ComputerFilter>
and Applications.Name like '%Microsoft%Office%2010%'
and ProductKeys.Vendor = 'Microsoft'
and ProductKeys.Product = 'Office'
and ProductKeys.Version = '2010' -
i'm new to all this and only do a little SQL... is <computerfilter> a placeholder where one is supposed to enter some other value? i tried to run that report and it came up with no results though there were 5 computers in my "all computers" section and i selected that as the context(my word for it) for the report.
-
Hi Anthony,
Yes, the <computerfilter> value is literal. When it is used in a WHERE clause it honors the Collection Source selected. If your collection source was set to All Computers and it returned no computers then I would start troubleshooting the query contents.
To sum up if you don't use the <computerfilter> flag then the query would always run against All Computers.
-
i thought that might be the case but, before i posted that first question, i had already tried running it by simply removing the '<computerfilter> and' portion of the query so the first parameter after the WHERE would be Applications.Name. And yet, still no results. Maybe i'm not correctly selecting the collection source.
<edit>... BTW, thanks so much for the fast reply! -
Hmmm ... I think there's something than I don't understand.
I made this query to retrieve the Office 2016 keys :
select
Computers.Name as "Computer Name",
Applications.Name,
ProductKeys.Key
from Computers
join Applications using (ComputerId)
join ProductKeys using (ComputerId)
where <ComputerFilter>
and Applications.Name like '%Microsoft%Office%2016%'
and ProductKeys.Vendor = 'Microsoft'
and ProductKeys.Product = 'Office'
and ProductKeys.Version = '2016'Unfortunately, I don't get the expected result.
What am I doing wrong?
Thanks for your help.
-
Use ProduKey:
https://www.nirsoft.net/utils/product_cd_key_viewer.html
Run ProduKey with a line like this:
Office:
ProduKey.exe /IEKeys 0 /OfficeKeys 1 /WindowsKeys 0 /scomma "\\path_to_file\Office\%computername%.txt" /sort 2 /sort ~1
Windows:
ProduKey.exe /IEKeys 0 /OfficeKeys 0 /WindowsKeys 1 /scomma "\\path_to_file\Windows\%computername%.txt" /sort 2 /sort ~1
At the end you have a txt files matching you pc name an the keys inside
Now you can copy/paste the keys into Inventory(Yes i'm sad too because PDQ doens't grab the keys anymore, this feature is lost somewhere between Inventory Version 8 and 9)
Hint:
If you upgraded free from Win 7/8 to 10, all Windows keys are the same:
VK7JG-NPHTM-C97JM-9MPGT-3V66TAs long as you didn´t erased the PC you can find the old original Win 7/8 key in the registry with ShowKeyPlus:
https://github.com/Superfly-Inc/ShowKeyPlus
And here the cmd line:
ShowKeyPlus.exe "\\path_to_file\UpgradeKeys\%computername%.txt"Again, at the end you have a txt file matching you pc name an the key inside
Greetings
-
Unfortunately, we have several versions of Office 2016 (no only VL) and I'm not able to retrieve the keys, I don't understand why.
When I type this command on my laptop, the created file is empty
ProduKey.exe /IEKeys 0 /OfficeKeys 1 /WindowsKeys 0 /scomma mykey.txt /sort 2 /sort ~1
Strange ...
Please sign in to leave a comment.
Comments
16 comments