标题: [系统相关] 批处理查看硬盘大小BAT,在WIN10上不可用,求解决。 [打印本页]
作者: 7895927 时间: 2018-12-19 12:20 标题: 批处理查看硬盘大小BAT,在WIN10上不可用,求解决。
- @echo off
- wmic DiskDrive get Size /value
- pause
复制代码
这个是查看电脑硬盘、U盘等大小的BAT,运行就会显示 SIZE=56854133字节这样的,
在WIN7上可以使用,但是win10上不能用了,求大师们解决一下,万分感谢。
作者: Batcher 时间: 2018-12-19 12:47
在我的Win10测试没有发现问题,你遇到什么报错信息了?
关闭用户账户控制了吗?
https://jingyan.baidu.com/article/19192ad8e4df3fe53e57073c.html
作者: 7895927 时间: 2018-12-19 20:03
回复 2# Batcher
什么叫关闭用户控制帐户?
作者: Batcher 时间: 2018-12-19 20:08
回复 3# 7895927
2楼那个连接能打开吗?看看介绍
作者: 7895927 时间: 2018-12-19 20:16
回复 4# Batcher
作者: 7895927 时间: 2018-12-19 20:17
回复 4# Batcher
UAC调到最低,最下面了,提示这个:
[img][/img]
作者: 7895927 时间: 2018-12-19 20:17
回复 4# Batcher
UAC设为最低还是不行
作者: Batcher 时间: 2018-12-19 20:19
回复 7# 7895927
你安装的是原版Win10吗
作者: 7895927 时间: 2018-12-19 20:20
回复 8# Batcher
对,我加了QQ群了。
作者: Batcher 时间: 2018-12-19 20:31
回复 9# 7895927
打开一个CMD窗口,执行这两个命令看看结果:
echo %path%
where wmic
欢迎加微信群
作者: 7895927 时间: 2018-12-19 21:39
回复 10# Batcher
感谢管理员,QQ郡里有个老师发了一个BAT先运行了,就可以了。感谢您。
作者: Batcher 时间: 2018-12-20 13:41
回复 11# 7895927
代码发出来分享一下吧
作者: xczxczxcz 时间: 2018-12-20 15:53
WIN 10 还用这个?这是对WIN10的???
PS 命令行中运行:
Get-WmiObject -Class Win32_DiskDrive
作者: 7895927 时间: 2018-12-21 08:31
回复 12# Batcher
好的,我来发,上次看到你的回复,发上来提示一天只能发5个贴子,不让发。
作者: 7895927 时间: 2018-12-21 08:54
回复 12# Batcher
cd /d %~dp0
%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
@echo off&cls
setx Path "%path%;C:\Windows\System32\wbem"
作者: Batcher 时间: 2018-12-21 09:16
回复 15# 7895927
明白了,这是用mshta命令执行了一段VBS脚本。并没有解决你的wmic不可用的问题。
作者: 7895927 时间: 2018-12-22 14:39
回复 16# Batcher
哦,我也不太懂,但效果是有了。
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |