Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Fixed Windows get OS version.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas committed Nov 11, 2013
1 parent 172c77f commit bee8ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/windows/functions
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ get_current_hostname(){
get_pc_info(){

pc_name=$(get_current_hostname)
pc_os_version=$(echo 'os get version' | wmic 2> /dev/null | tail -1)
pc_os_version=$(echo 'os get version' | wmic 2> /dev/null | grep -i version -A1 | tail -1)

local chassis_type=`echo 'systemenclosure get ChassisTypes' | wmic 2> /dev/null | grep '{' | sed 's/[^0-9]//g'`
if [[ $chassis_type == "8" || $chassis_type == "9" || $chassis_type == "10" || $chassis_type == "11" || $chassis_type == "14" ]]; then
Expand All @@ -245,4 +245,4 @@ get_pc_info(){

rm -f "$base_path/TempWmicBatchFile.bat" 2> /dev/null

}
}

0 comments on commit bee8ff4

Please sign in to comment.