How to check, from C#, are files for complex script and rtl languages installed?

前端 未结 2 504
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 17:51

How to check, from C#, are files for complex script and rtl languages (Regional and Language settings) installed?

Edit: Or is there another way of checking whether r

相关标签:
2条回答
  • 2021-01-16 18:44

    I'm not sure if this will get you all the way there but, you can query WMI. If you are using .Net, check out the System.Management namespace. You will be interested in...

    Namespace: root\cimv2 Class: Win32_OperatingSystem Properties: MUILanguages and/or Locale

    0 讨论(0)
  • 2021-01-16 18:46

    Thank you for your info. I queried WMI for Win32_OperatingSystem Properties. It returns Win32_OperatingSystem Class with all fields and properties except MUILanguages :(

    ...
      uint32 MaxNumberOfProcesses;
      uint64 MaxProcessMemorySize;
      string MUILanguages[]; //I don't see this field, and all others I see
      string Name;
      uint32 NumberOfLicensedUsers;
    ...
    

    Any help? I use WinXP SP2 and VS2005

    Code I used refereence: System.Management;

    string ConfigNamespace = @"\\.\root\cimv2";
    string query = "select * from Win32_OperatingSystem";
    
    ManagementObjectSearcher searcher = 
      new ManagementObjectSearcher(ConfigNamespace, query);
    
    ManagementObjectCollection collection = searcher.Get();
    
    foreach (ManagementObject item in collection)
    {
      //PropertyData pd = item.Properties["MUILanguages"];
    
      foreach (PropertyData data in item.Properties)
      {
    
      }
    }
    
    0 讨论(0)
提交回复
热议问题