M
Manuel Alves
Hi all,
I've got a windows service that depends on some other services. On the
project installer I state this by using:
Me.myService.ServicesDependedOn = New String() {"Print Spooler", "Net
Logon", "Network Connections"}
The problem:
If the server is not an english version I have to translate the service
names. Here is how I do it for portuguese and "other" (english):
Dim ci As CultureInfo = CultureInfo.CurrentUICulture
If InStr(ci.TwoLetterISOLanguageName, "pt", CompareMethod.Text) > 0 Then
Me.myService.ServicesDependedOn = _
New String() {"Spooler de impressão", "Início de sessão de rede",
"Ligações de rede"}
Else
Me.myService.ServicesDependedOn = _
New String() {"Print Spooler", "Net Logon", "Network Connections"}
End If
But what if it gets deployed to a German, Spanish or French server?
Do I need to code every possibility or is there a way to reference these
services in a language independent way?
Best regards,
Manuel Alves
I've got a windows service that depends on some other services. On the
project installer I state this by using:
Me.myService.ServicesDependedOn = New String() {"Print Spooler", "Net
Logon", "Network Connections"}
The problem:
If the server is not an english version I have to translate the service
names. Here is how I do it for portuguese and "other" (english):
Dim ci As CultureInfo = CultureInfo.CurrentUICulture
If InStr(ci.TwoLetterISOLanguageName, "pt", CompareMethod.Text) > 0 Then
Me.myService.ServicesDependedOn = _
New String() {"Spooler de impressão", "Início de sessão de rede",
"Ligações de rede"}
Else
Me.myService.ServicesDependedOn = _
New String() {"Print Spooler", "Net Logon", "Network Connections"}
End If
But what if it gets deployed to a German, Spanish or French server?
Do I need to code every possibility or is there a way to reference these
services in a language independent way?
Best regards,
Manuel Alves