Bonjour à tous,
Une fois de plus je fais appel à vos connaissances
Comment lister toutes les clés d'une branche précise du registre sachant qu'il peut y avoir 3 clés un jour puis 5 le lendemain ?
Merci bcp !
Ludo
Bonjour à tous,
Une fois de plus je fais appel à vos connaissances
Comment lister toutes les clés d'une branche précise du registre sachant qu'il peut y avoir 3 clés un jour puis 5 le lendemain ?
Merci bcp !
Ludo
Voici ma procédure que je voudrais modifier afin qu'elle puisse me lister les clés qui seront rajoutées plus tard en cas d'évolution du logiciel.
Vous comprenez maintenant pourquoi je ne peux pas me contenter de ma procédure
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 Private Sub GetRegistre() Me.ListViewRegistre.Clear() With Me.ListViewRegistre .Columns.Add("Clé", 100, HorizontalAlignment.Center) .Columns.Add("Valeur", 225, HorizontalAlignment.Left) .Columns.Add("Clé complète", 400, HorizontalAlignment.Left) End With Try With Me.ListViewRegistre.Items.Add("Localisation") .SubItems.Add(CStr(My.Computer.Registry.GetValue ("HKEY_LOCAL_MACHINE\Software\Ludo", "Localisation", "")).ToLower) .SubItems.Add ("HKEY_LOCAL_MACHINE\Software\Ludo\Localisation") End With Catch ex As Exception End Try Try With Me.ListViewRegistre.Items.Add("Version") .SubItems.Add(CStr(My.Computer.Registry.GetValue ("HKEY_LOCAL_MACHINE\Software\Ludo", "Version", "")).ToLower) .SubItems.Add ("HKEY_LOCAL_MACHINE\Software\Ludo\Version") End With Catch ex As Exception End Try Try With Me.ListViewRegistre.Items.Add("InstallationType") .SubItems.Add(CStr(My.Computer.Registry.GetValue ("HKEY_LOCAL_MACHINE\Software\Ludo", "InstallationType", "")).ToLower) .SubItems.Add ("HKEY_LOCAL_MACHINE\Software\Ludo\InstallationType") End With Catch ex As Exception End Try Try With Me.ListViewRegistre.Items.Add("Path") .SubItems.Add(CStr(My.Computer.Registry.GetValue ("HKEY_LOCAL_MACHINE\Software\Ludo", "Path", "")).ToLower) .SubItems.Add("HKEY_LOCAL_MACHINE\Software\Ludo\Path") End With Catch ex As Exception End Try End Sub
Aidez-moi svp je tourne en rond...
Merci par avance
Ludo
Voici la réponse à mon problème :
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
22 Private Sub GetRegistre() Me.ListViewRegistre.Clear() With Me.ListViewRegistre .Columns.Add("Clé", 100, HorizontalAlignment.Center) .Columns.Add("Valeur", 225, HorizontalAlignment.Left) .Columns.Add("Clé complète", 400, HorizontalAlignment.Left) End With For Each sKey As String In Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("Software").OpenSubKey("Ludo").GetValueNames With Me.ListViewRegistre.Items.Add(sKey) .SubItems.Add((CStr (Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("Software").OpenSubKey("Ludo").GetValue(sKey))).ToLower) .SubItems.Add("HKEY_LOCAL_MACHINE\Software\Ludo\" & sKey) End With Next End Sub
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager