-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os-locale calls wmic with no extension and without explicit path #35
Comments
|
// @MarkTiedemann Idea for a Windows binary, if you need project ideas. A simple binary to get the locale on Windows. So we don't have to use |
@sindresorhus Done. See: locale. Note that it prints |
Updated :: If Windows Vista or greater
$ locale
{"locale":"en-US"}
:: Else
$ locale
{"lcid":1033} @sindresorhus Let me know if you need anything else. :) |
I don't really see the point of supporting older than Vista. Those are ancient versions and not worth our time. I'm not going to support them anyway, so I personally preferred the first version that only printed a string, but I can work with this too and only use the |
All right. I'll switch back to locale only then. This also simplifies the build process a lot.
|
Our Windows app that uses os-locale has been flagged as a security risk because it will launch any file named "wmic", regardless of extension, and the file can be anywhere on the PATH, including the app's own directory. It could be a vbs file, for example.
The suggested secure way (if you have to use wmic):
The text was updated successfully, but these errors were encountered: