web-dev-qa-db-fra.com

Comment définir Notepad ++ comme éditeur par défaut?

Je veux définir Notepad ++ comme éditeur par défaut. J'ai essayé de le définir en faisant un clic droit sur un fichier, puis Ouvrir avec. Mais je n'ai pas vu Notepad ++ dans la liste des résultats (même après avoir cliqué sur Choisir d'autres programmes).

Lorsque j'essaie de rediriger vers Notepad ++ via l'option Parcourir vers le fichier notepad++.exe, cela ne fait rien. (Son ne reconnaissant pas en quelque sorte)

 enter image description here

97
madhu
  1. Démarrez Notepad ++ avec des privilèges élevés.

    enter image description here

  2. Dans Notepad ++, accédez à Paramètres , Préférences ...

  3. Allez dans File Association tab.

  4. Sélectionnez fortran, TeX, SQL puis.sqlet ajoutez-le aux extensions enregistrées:

    enter image description here

  5. Cliquez sur Fermer .

107
Der Hochstapler

Vous pouvez modifier le registre. À partir de ce site , j'ai trouvé une modification assez complète de regedit qui fonctionne bien pour moi et qui change vraiment le programme par défaut du bouton droit de la souris "Modifier".

Les portions hexadécimales correspondent exactement à la même chaîne de chemin que Notepad ++. Je ne sais pas pourquoi elles ont été mises en hexadécimal, mais elles sont inoffensives. Encore une fois, je n'ai pas créé ce code.

  1. Copiez le texte suivant, collez-le dans un nouveau fichier .txt et enregistrez-le.
  2. Renommez-le en filename.reg.
  3. Ensuite, double-cliquez dessus et acceptez les fenêtres contextuelles qui vous avertissent de la modification du registre.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\Shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\batfile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\cmdfile\Shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\cmdfile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\inffile\Shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\inffile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\inifile\Shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\inifile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\JSEFile\Shell\Edit\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\JSEFile\Shell\Print\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” /p “%1″

[HKEY_CLASSES_ROOT\JSFile\Shell\Edit\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\JSFile\Shell\Print\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” /p “%1″

[HKEY_CLASSES_ROOT\regfile\Shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\regfile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\Microsoft.PowerShellData.1\Shell\Open\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\Microsoft.PowerShellModule.1\Shell\Open\Command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\scriptletfile\Shell\Open\command]
@=”C:\Program Files (x86)\Notepad++\notepad++.exe” “%1″

[HKEY_CLASSES_ROOT\txtfile\Shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\txtfile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\txtfile\Shell\printto\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,74,00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,\
00,20,00,22,00,25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00

[HKEY_CLASSES_ROOT\VBEFile\Shell\Edit\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\VBEFile\Shell\Print\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Print\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Windows.XamlDocument\Shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Windows.Xbap\Shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Windows.CompositeFont\Shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\WSFFile\Shell\Edit\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\WSFFile\Shell\Print\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\zapfile\Shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\zapfile\Shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\zapfile\Shell\printto\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\
00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\
2f,00,70,00,74,00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,\
00,20,00,22,00,25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00
9
Carles Alcolea

Démarrez le bloc-notes ++ en tant qu'administrateur en cliquant avec le bouton droit de la souris sur son icône et en sélectionnant l'action appropriée:

enter image description here

Dans Settings > Preferences..., vous pouvez associer les extensions de votre choix à Notepad ++, en utilisant la boîte de dialogue suivante:

notepad++ association dialog

Dans ce cas, un clic sur la flèche soulignée en rouge associerait tous les fichiers .txt avec Notepad ++.

9
m4573r

Alternativement, vous pouvez également remplacer notepad.exe par notepad ++. Exe (ou notepad2.exe ou un autre éditeur).

Jetez un coup d'oeil à ce Gist pour avoir une idée sur la façon de le faire: https://Gist.github.com/amarraja/3938304

5
Ehtesh Choudhury

La voie la plus directe que j'ai trouvée consiste à dire à Windows d'utiliser Notepad ++ (ou Notepad2 ou ...) au lieu du Notepad.exe par défaut du système en utilisant Exécution du fichier image . Il est plus sûr (et plus simple!) De remplacer des fichiers système ou de jouer avec plusieurs entrées de registre.

Autres sources:

3
matt wilkie