c ++通过WMI更改硬件ID
c++ change hardware-IDs via WMI
目前我正在开发一个程序,我想将它安装到几台计算机上。根据这个站点,我使用 WMI 查询了一些硬件 ID(磁盘、主板和 CPU):
https://msdn.microsoft.com/en-us/library/aa390423(v=vs.85).aspx
由于那里使用了 SQL,是否可以不仅通过 SELECT
接收数据,还可以通过 UPDATE
查询更改数据?如果是这样,创建 "copy-protected program" 的尝试就会失败,对吗?
WMI
使用WQL language which is only a small subset of the ANSI SQL. The WQL
language doesn't supports the UPDATE or INSERT statements. Also if you want update some property value this depends if the WMI property/class is writable, finally depending of what you want accomplish you must use the IWbemClassObject.Put
or the IWbemServices.PutInstance
方法。
目前我正在开发一个程序,我想将它安装到几台计算机上。根据这个站点,我使用 WMI 查询了一些硬件 ID(磁盘、主板和 CPU): https://msdn.microsoft.com/en-us/library/aa390423(v=vs.85).aspx
由于那里使用了 SQL,是否可以不仅通过 SELECT
接收数据,还可以通过 UPDATE
查询更改数据?如果是这样,创建 "copy-protected program" 的尝试就会失败,对吗?
WMI
使用WQL language which is only a small subset of the ANSI SQL. The WQL
language doesn't supports the UPDATE or INSERT statements. Also if you want update some property value this depends if the WMI property/class is writable, finally depending of what you want accomplish you must use the IWbemClassObject.Put
or the IWbemServices.PutInstance
方法。