MS really is a pain in the ass when it comes to localization! Not only do they translate Windows Firewall Rules so they can't be managed/scripted by netsh in a meaningful way, no, they even translate parameters to command line programs (takeown.exe)! *argh*
@WSUSUpdateAdmin
I have an idea how such situations can be handled, although this wouldn't work without knowing the translation of every term that is fed into find(str).exe. Use some helper batch that contains the translated strings for such situations. Something like this:
- Code: Select all
set wuauserv_state_en-us=STATE
set wuauserv_state_es-es=ESTADO
set wuauserv_state_de-de=STATE
(and so on)
And in DoUpdate.cmd call this batch, and get the variable's contents using the locale it already determined, something like this:
- Code: Select all
sc.exe query wuauserv | call %SystemRoot%\System32\find.exe /I "%wuauserv_state_%locale%%"
assuming %locale% contains the locale. Furthermore there should be some kind of default string that is used when no localized string is set.
I also thought about getting the required string directly from the MUI files (sc.exe.mui) but that doesn't contain any resource strings on my German system, so I'm not sure this is the case on other systems.
Regards
Dalai