Mark Liam Brown via Cygwin writes:

> I am trying to parse the output of "net use" in a bash script, but
> hit a roadblock: The output of "net use" changes with the language
> of the system (English, Danish, French, ...), so parsing becomes
> nearly impossible
>
> How can I force the language used by "net use" to English, even if the
> system default language is Danish or French?

Not sure what your execution environment is, but if you can run it
from under PowerShell, seems possible that a simple PowerShell script
might do the trick, using the right Get-... / Set-... cmdlets as
documented here:

  https://learn.microsoft.com/en-us/powershell/module/international/

Bullet-proofing this so that you don't leave the wrong setting in
place if "net use" etc. blow up is a further requirement for real
deployment.

I don't know enough Windows jargon to figure out _which_ pair will
affect the output from "net use" etc., but someone else may be able to
shed light on that question.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND
                           e-mail: h...@inf.ed.ac.uk
                      URL: https://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to