Pull product keys for MS office and Adobe products
I was wondering what the best way to use the Kace 1000 appliance to pull product keys for MS office and Adobe products?
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
scottlutz
12 years ago
Posted by:
dchristian
12 years ago
scottlutz,
Great find!!!
I just wiped this together in powershell.
Then what i did was add it to a shell script.
Uploaded my script (called keyer.ps1) and the CPP-ProductKeyFinder.exe as a dependency.
Here's the script text:
Make sure you change the script name from script.sh to script.bat
This will create a couple of reg keys.
You can return them with the following custom inventory rules. (each is its own rule)
Office = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Office,TEXT)
Windows = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Windows,TEXT)
VMWare = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Vmware,TEXT)
CS = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,CS,TEXT)
Visual Studio = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Visual Studio,TEXT)
Take a look at my previous post on how to creat the reports for the new Keys.
Great find!!!
I just wiped this together in powershell.
$filer = type *.txt
function add-key([string]$namer,[String]$Value)
{
$pather = "HKLM:\system\TVG"
$Value = $Value.Replace(',',"_")
New-Item -Path $pather -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $pather -Name "$namer" -ErrorAction SilentlyContinue
New-ItemProperty -Path $pather -Name "$namer" -Value $Value
}
cls
for($i = 0 ; $i -le $filer.Length - 1; $i++)
{
$temper = $filer[$i]
if( $temper -like "Microsoft Office*")
{
add-key "Office" $temper
}
if($temper -like "*Windows*")
{
add-key "Windows" $temper
}
if($temper -like "VMWare*")
{
add-key "Vmware" $temper
}
if($temper -like "*CS*")
{
add-key "CS" $temper
}
if($temper -like "*visual studio*")
{
add-key "Visual Studio" $temper
}
}
Then what i did was add it to a shell script.
Uploaded my script (called keyer.ps1) and the CPP-ProductKeyFinder.exe as a dependency.
Here's the script text:
CPP-ProductKeyFinder.exe /csv
powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file "keyer.ps1"
Make sure you change the script name from script.sh to script.bat
This will create a couple of reg keys.
You can return them with the following custom inventory rules. (each is its own rule)
Office = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Office,TEXT)
Windows = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Windows,TEXT)
VMWare = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Vmware,TEXT)
CS = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,CS,TEXT)
Visual Studio = RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\TVG,Visual Studio,TEXT)
Take a look at my previous post on how to creat the reports for the new Keys.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.