Get windows version from git bash
Get windows version from git bash
I was trying to determine the type of windows10 install (home vs pro) in a git-bash shell script using:
if [[ ! $(wmic os get caption) = *"Home"* ]];then
echo "Not using windows home"
fi
However a french user just reported a bug where the windows version was returned in the local language, in this case "Microsoft Windows 10 Famille". Other than translating "Home" into every language, is there a better way to determine if the script is running on home vs pro in the face of multiple languages?
1 Answer
1
Well one solution i have found is to look for the existence of bitlocker as feature that exists on windows pro and not on windows home.
if [[ ! -f /c/Windows/System32/BitLockerWizard.exe ]];then
echo "On windows home"
fi
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy