Batch file 通过网络运行WMIC文件版本?
我正在尝试通过网络运行WMIC以获取特定文件的版本。我知道要获取本地文件版本,您可以执行以下操作:Batch file 通过网络运行WMIC文件版本?,batch-file,Batch File,我正在尝试通过网络运行WMIC以获取特定文件的版本。我知道要获取本地文件版本,您可以执行以下操作: wmic datafile where name='\\C:\localfile.exe' get version 如果我想在网络上找到它怎么办?像这样: wmic datafile where name='\\fileserver\\e$\\file.exe' get version 有可能这样做吗?我有问题服务器的用户名和密码 wmic /NODE fileserver /USER use
wmic datafile where name='\\C:\localfile.exe' get version
如果我想在网络上找到它怎么办?像这样:
wmic datafile where name='\\fileserver\\e$\\file.exe' get version
有可能这样做吗?我有问题服务器的用户名和密码
wmic /NODE fileserver /USER user /PASSWORD pass datafile where name='e:\\file.exe' get version
是的,您需要指明用户和密码,除非执行查询的用户拥有远程节点的权限
查询是针对本地(到远程计算机)数据库执行的,该数据库的元素已注册到本地(到远程)路径
而反斜杠需要避免