Bonjour, depuis peu, je suis confronté à un souci avec l'association de l'extension avec mon programme.
Windows refuse désormais de prendre en compte l'association d'extensions.
Les clés de registre ont été créées avec succès, mais l'extension n'est pas liée au programme.
Je ne comprends pas pourquoi cela fonctionnait si bien avant.
J'ai testé sur un autre ordinateur avec le système exploitation Windows 10, cela fait la même chose, Les clés de registre ont été créées, mais l'extension n'est pas liée au programme.
Merci.
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 const ExtWdoc = 'wdoc'; RootKey = '\Software\Classes\'; { RegisterFileWdoc } procedure TFOptions.RegisterFileWdoc; var R: TRegistry; begin R := TRegistry.Create; try R.RootKey := HKEY_LOCAL_MACHINE; if R.OpenKey(RootKey + '.' + ExtWdoc, True) then begin R.WriteString(EmptyStr, ExtWdoc); if R.OpenKey(RootKey + ExtWdoc + 'File', True) then begin R.WriteString(EmptyStr, 'Bibliothèque ' + Application.Title); if R.OpenKey(RootKey + ExtWdoc + 'File\DefaultIcon', True) then begin R.WriteString(EmptyStr, Application.ExeName); if R.OpenKey(RootKey + ExtWdoc + 'File\shell\open\command', True) then R.WriteString(EmptyStr, '"' + Application.ExeName + '" "%1"'); end; end; end; finally R.Free; end; SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil); end;
Partager