netinvent / windows_tools

Collection of various interfaces for Windows functionality in a Pythonic way
BSD 3-Clause "New" or "Revised" License
62 stars 15 forks source link

[FEATURE] Can you add a method to show the windows license type (OEM,Retail,Volume)? #17

Open evilsh3ll opened 6 months ago

evilsh3ll commented 6 months ago

Can you add a method to show the windows license type (OEM,Retail,Volume)?

deajan commented 6 months ago

Try new function get_windows_product_channel() in windows_tools.product_key implemented in https://github.com/netinvent/windows_tools/commit/66a9e7634aab95f839781f70feabd89e8f1a6e40

evilsh3ll commented 6 months ago

Thank you, are you planning to update the package in pip too?

deajan commented 6 months ago

Can update the pip package, but check it first. Also I'm not fixed yet if I keep multiple OEM subversions or just return "OEM" which is more easier to parse.

evilsh3ll commented 6 months ago

In windows 10 LTSC (Retail) it seems to return only "UNKNOWN" image

deajan commented 6 months ago

Can you give me the output of the following command on your system ?

wmic path SoftwareLicensingProduct get /format:list

Also the output of slmgr /dlv ?

evilsh3ll commented 6 months ago

wmic path SoftwareLicensingProduct get /format:list output (removed in 1day): https://bin.disroot.org/?82c3db9bc8c793be#EzZL2jvSDsJNbc67iBg1DYti2QKvWXrxrv6RuKtXJhn4 slmgr /dlv image

deajan commented 6 months ago

Really strange, your output should be perfectly parseable. Is your machine activated (the script only returns activated license channel) ? What version of Windows do you run ? Can you retest the python script as admin ?

Have no other idea right now.

deajan commented 6 months ago

Having quiclky re-read your output quickly, can you confirm that your machine isn't activated at all ?