Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the README, please add that on Windows 11, the "wmic" functionality is required to use the Obok plugin. #670

Closed
JoeYang1412 opened this issue Nov 8, 2024 · 4 comments

Comments

@JoeYang1412
Copy link

Question / bug report

Here's the situation: After reinstalling my computer with Windows 11, I also reinstalled Kobo Desktop, Calibre, and the NoDRM/DeDRM_tools plugin. Initially, when using Obok in Calibre, I received the following warning: "No userkeys found to decrypt books with. No point in proceeding." Thinking this might be a version issue, I tried reinstalling an older version, but the problem persisted. I then decided to enable debug mode, and in the log, I noticed this message: "'wmic' is not recognized as an internal or external command."

To troubleshoot further, I set up a Windows 10 virtual machine, installed Kobo, Calibre, and NoDRM/DeDRM_tools, and found that everything worked correctly—no warnings appeared in the log. I discovered that the "wmic" component is pre-installed on Windows 10 but not on Windows 11. After installing this component on Windows 11, Obok started working normally, confirming that the missing component was the issue.

To add this feature in Windows 11, go to Settings > System > Optional features > Add an optional feature, click View features, search for "wmic," and install it. You can then enter wmic in the command prompt to verify if the installation was successful.

Below is the log file from Windows 11.

I would appreciate it if you could add this explanation to the README as described in the title. Thank you for your help.

Which version of Calibre are you running?

7.21.0

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
calibre 偵錯記錄
calibre 7.12  embedded-python: True
Windows-10-10.0.26100-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26100')
Python 3.11.5
Windows: ('10', '10.0.26100', 'SP0', 'Multiprocessor Free')
Interface language: zh_TW
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Obok DeDRM (10, 0, 3)
calibre 7.12  embedded-python: True
Windows-10-10.0.26100-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26100')
Python 3.11.5
Windows: ('10', '10.0.26100', 'SP0', 'Multiprocessor Free')
Interface language: zh_TW
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Obok DeDRM (10, 0, 3)
QPA platform: windows
devicePixelRatio: 1.5
logicalDpi: 96.0 x 96.0
physicalDpi: 72.62613065326633 x 72.57142857142857
[0.00] Starting up...
[0.00] Showing splash screen...
[0.38] splash screen shown
[0.38] Initializing db...
[0.39] db initialized
[0.39] Constructing main UI...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
[0.69] GUI main window shown
[0.80] main UI initialized...
[0.80] Hiding splash screen
'wmic' is not recognized as an internal or external command,
operable program or batch file.
@ElleKayEm
Copy link

Also suggest using Obok 10.0.9.

@JoeYang1412
Copy link
Author

Apologies for forgetting to mention that I also encountered the same issue using version 10.0.9. However, after adding this component in Windows 11, the issue was resolved.

@noDRM noDRM closed this as completed in 501a1e6 Nov 10, 2024
@noDRM
Copy link
Owner

noDRM commented Nov 10, 2024

Thanks for the report, I've updated the readme for the Obok plugin.

@weal1312
Copy link

According to msdn, getmac.exe can also get mac address when os verision >= windows 10.
I use code below and successfully solve this problem.

output = subprocess.Popen('wmic nic where PhysicalAdapter=True get MACAddress || getmac', shell=True, stdout=subprocess.PIPE, text=True).stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants