PluginsOCSInventory-NG / officepack

Retrieve microsoft office keys
GNU General Public License v2.0
15 stars 27 forks source link

a problem with key removal #40

Open K4mil5 opened 6 years ago

K4mil5 commented 6 years ago

Hey, I have a problem with the 2016 office keys reporting, with the last 5 characters. The OCS agent will send 3 keys and the server will receive them, but after a while the key with the correct last octet will be removed from the server. Does anyone know why he is removed?

It's about the key from the photo przechwytywanie

smd0709 commented 6 years ago

Hello! Do you see the data in the administration interface? I have this problem pending https://github.com/PluginsOCSInventory-NG/officepack/issues/39 Thankss!

K4mil5 commented 6 years ago

I do not see, I see keys only in individual. I solved the problem, the reason was the lack of permission to write the output.txt file in %userprofile%. After converting the destination to C:\ocs and changing the file extension from txt to xml, everything works fine.

result = WshShell.Run("cmd /c cscript ""C:\Program Files\Microsoft Office\Office16\OSPP.VBS"" /dstatus > %USERPROFILE%\officekey.txt", 0, true)

I changed to

result = WshShell.Run("cmd /c mkdir C:\ocs\", 1, true)
result = WshShell.Run("cmd /c cscript ""C:\Program Files\Microsoft Office\Office15\OSPP.VBS"" /dstatus > C:\ocs\office2013key.xml", 1, true)

maybe someday it will be useful to someone :)