Bonjour
j'aimerai savoir quelle version d'office365 installé sur le poste de travail x86 ou x64 ?voila le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
    Private Function GetOfficeVersion() As String
        Dim officeVersion As String = "Inconnue"
        Try
            Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Office\ClickToRun\Configuration")
            If regKey IsNot Nothing Then
                Dim platformValue As Object = regKey.GetValue("Platform")
                If platformValue IsNot Nothing Then
                    Dim platform As String = platformValue.ToString()
                    If platform.Equals("x64", StringComparison.OrdinalIgnoreCase) Then
                        officeVersion = "Office 365 64 bits"
                    ElseIf platform.Equals("x86", StringComparison.OrdinalIgnoreCase) Then
                        officeVersion = "Office 365 32 bits"
                    End If
                End If
                regKey.Close()
            End If
        Catch ex As Exception
            ' Gérer les erreurs éventuelles
        End Try
        Return officeVersion
    End Function
A l'exécution j'ai le résultat Inconnue !!
Merci pour votre aide