我想知道如何通过Java或Powershell获得硬盘驱动器的坏扇区。
在使用chkdsk命令和JPowershell库时,我遇到了一些问题。我以前经常执行
PowerShellResponse response = PowerShell.executeSingleCommand("chkdsk");
return response.getCommandOutput();和
PowerShellResponse response = PowerShell.executeCommand("chkdsk");
return response.getCommandOutput();我在管理模式下运行了这两个程序,但是它们都将输出返回为
文件系统的类型为NTFS。
在powershell中执行chkdsk的问题是,获取信息需要一段时间,之后只显示数据。
发布于 2018-10-31 13:04:31
过了一段时间,我找到了不能使用JPowershell的答案,而是使用了java运行时进程,因为chkdsk命令动态地接收数据。因此,我必须手动执行和检索数据。
https://stackoverflow.com/questions/52698572
复制相似问题