mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-22 01:06:34 +00:00
[release]
This commit is contained in:
@@ -61,17 +61,22 @@ public interface OsType {
|
||||
|
||||
@Override
|
||||
public String determineOperatingSystemName(ShellControl pc) throws Exception {
|
||||
return pc.executeStringSimpleCommand("wmic os get Caption")
|
||||
.lines()
|
||||
.skip(1)
|
||||
.collect(Collectors.joining())
|
||||
.trim()
|
||||
+ " "
|
||||
+ pc.executeStringSimpleCommand("wmic os get Version")
|
||||
.lines()
|
||||
.skip(1)
|
||||
.collect(Collectors.joining())
|
||||
.trim();
|
||||
try {
|
||||
return pc.executeStringSimpleCommand("wmic os get Caption")
|
||||
.lines()
|
||||
.skip(1)
|
||||
.collect(Collectors.joining())
|
||||
.trim()
|
||||
+ " "
|
||||
+ pc.executeStringSimpleCommand("wmic os get Version")
|
||||
.lines()
|
||||
.skip(1)
|
||||
.collect(Collectors.joining())
|
||||
.trim();
|
||||
} catch (Throwable t) {
|
||||
// Just in case this fails somehow
|
||||
return "Windows ?";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user