PDA

View Full Version : WMIc deprecated



ReneMiner
28-03-2020, 09:47
It's already like that (displayed if input "WMI" to commandline) WMI/WMIC is deprecated.

Anyway WMI module depends on it but since iDispatch is part of the core-module i would consider to drop the "experimental WMI-module" and its sample-file out of the shipped Installer-package.
Maintain it maybe as an optional additional module, available in forum somewhere together with some note that WMI.dll is required etc.


Also OnlineScores-module could be migrated as an optional additional download since it will not function without any preparation of the forum-software. That still can be done as soon as someone asks for it
And if someone reallly uses it, it will be no big deal to have thinbasic downloading the required module ´(It's ONLINE-scores so if anyone wants to use it he will be connected to the internet anyway...)
Just mention in Help where to obtain it ("additional modules in forum") and just start a slight cleanout of things that will be deprecated soon or that were never used by anyone.

DirectuX
28-03-2020, 11:52
about wmi there is some nuance :

As mentioned in comments, WMIC is utility that acts as interface to communication with WMI. It's not WMI itself that is being deprecated, but "just" the interface.
source: https://stackoverflow.com/questions/57121875/what-can-i-do-about-wmic-is-deprecated

Petr Schreiber
28-03-2020, 21:47
Hi Rene, DirectuX,

thanks for the information. I think it would be good to add information to help file, that WMI[C] might be in danger on Windows 10. I did not know it and I thank you for letting us know :drink:

However, as we have users of older Windows in thinBASIC users base, for these it is perfectly valid tool.

If we find feature which has no future (may be the case of WMI), I think we should:
- state it clearly in release notes/forum/social media
- state it clearly in help file
- remove it in next Major release (thinBasic 2.x)

I have features in TBGL marked as deprecated since 2006, but I will remove them completely not sooner than in ThinBASIC 2.x.

I would personally perform removal/breaking changes only in case:
- of major version number change (thinBasic 1.x -> 2.x)
- in Beta versions - Beta version are experimental, to get feedback on shaping of new features, and change is possible/expected, as nobody responsible uses Beta version on critical projects

This way users can update their thinBASIC 1.x stable on production with confidence their older code runs without any change.

I am sure there will be well justified exceptions from these rules, but not everyone has time to monitor release notes to find one of the 1000 changes contains something which will break his code.

What would be ideal for sure is some kind of tool to analyze scripts and warn you about usage of deprecated functions.


Petr