How can I use `wmic` in a Windows PE script?

落爺英雄遲暮 提交于 2019-12-12 19:32:04

问题


I'm trying to determine the computer model (e.g., "Optiplex 9010") in a batch script running in the context of Windows PE 3.1. When running Windows proper, I can do this using wmic csproduct or wmic bios but neither of these return any data when running Windows PE. (This also seems to be true of most or all other classes.)

I've already installed the winpe-wmi.cab package to support WMI. Using wmic path instead of an alias makes no difference.

How can I make my wmic commands work?


回答1:


It turns out that most wmic commands, including both wmic csproduct and wmic bios, will work if you install the winpe-scripting.cab package in addition to the winpe-wmi.cab package.



来源:https://stackoverflow.com/questions/35617451/how-can-i-use-wmic-in-a-windows-pe-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!