开发者

how to get .Net method info PerformanceCounterCategory CategoryHelp in another language instead of English

I am not native English Speaker . I hope you understand what i mean. A bit Powershell code that i wrote

Show Descriptions of Counters and Category

 
    $n=@( ("Memory","Available MBytes"),
        ("Memory","Free System Page Table Entries"),
        )

$ppt = New-Object System.Diagnostics.PerformanceCounter $ppt2 = New-OBject System.Diagnostics.PerformanceCounterCategory

foreach( $it in $n){         
        $ppt.categoryName=$it[0]
        $ppt.counterName=$it[1]
        $ppt2.categoryName =$it[0]
        $var = $ppt2.categoryName
        $var2 = $ppt.counterName
        $ppt.instanceName =''

        echo "CategoryName  : $var " 
        echo  ( "Category Help : " + $ppt2.CategoryHelp) 
        echo "CounterName   : $var2" 
        echo ("CounterHelp   : " +  $ppt.counterHelp)  
        echo "" 
}

This gives me in CounterHelp and Category Help in English Description. How to get a German Description of that Counter or Category even i use English Windows. I have tried on a German Windows but it did开发者_运维百科n't work. If it is not possible on English windows. What did i wrong on German Windows? Thx


You need the german version of Windows. I use the german Windows 7 version.

To retrieve the german help text of the category and counter you must use the german names.

change:

$n=@(("Memory","Available MBytes"))

to:

$n=@(("Arbeitsspeicher","Verfügbare MB"))

You will find the english category and counter names in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

The german names in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\007

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜