add distro detection for windows
This commit is contained in:
parent
b5a6624f2d
commit
81d34ccdd8
1 changed files with 4 additions and 0 deletions
|
@ -69,5 +69,9 @@ if [ "$system_type" = "linux" ] && [ -z "$machine" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$system_type" = "windows" ] && [ -z "$machine"] && [ "$hassed" -eq 1 ]; then
|
if [ "$system_type" = "windows" ] && [ -z "$machine"] && [ "$hassed" -eq 1 ]; then
|
||||||
|
if [ "$hasawk" -eq 1 ]; then
|
||||||
|
distro="$(systeminfo.exe 2>/dev/null | grep -v "BIOS" | grep "OS Name" | awk -F ":" '{print $2}' | tr -s " ")"
|
||||||
|
distro="$distro $(systeminfo.exe 2>/dev/null | grep -v "BIOS" | grep "OS Version" | awk -F ":" '{print $2}' | tr -s " ")"
|
||||||
|
fi
|
||||||
machine="$(wmic.exe computersystem get Manufacturer,Model | sed -n 2p | head -n 1)"
|
machine="$(wmic.exe computersystem get Manufacturer,Model | sed -n 2p | head -n 1)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue