Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This has been itching me for quite a long time. When I come on a new computer with any version of Windows, I need to:

  • un-hide file extensions
  • set explorer default view to list instead of icons
  • set the file extensions like h c cpp so they don't open Visual C++ (which can take up to 20 seconds!) each time I double click on them, opening them with something like Notepad++ instead.

Isn't there some program to quickly set thoses options to something I want, like some standalone exe, or some generic registry file I can execute when I come on a new machine?

I'm a developer and I can't believe I'm wasting so much time on those &*$%@# things.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can do this all through the registry:

Unhide file extensions for known filetypes

You can use the following DWORD to make the file extensions visible:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000000

Setting the default Explorer view to 'List'

Setting default explorer view is somewhat more difficult, I always have it in my options when nLiting (you might want to look into nLite, it can automate a lot of stuff during installation and set system settings like the ones you describe).

I assume this key will work (taken straight from my registry), but assuming it doesn't make sure to back up your existing value for Settings first.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams]
"Settings"=hex:08,00,00,00,04,00,00,00,01,00,00,00,00,77,7e,13,73,35,cf,11,ae,\
69,08,00,2b,2e,12,62,04,00,00,00,01,00,00,00,43,00,00,00

Automatically opening certain filetypes in Notepad++

Now, for the automatic opening in Notepad++ go to these keys (or create them):

[HKEY_LOCAL_MACHINE\Software\Classes\.h]
[HKEY_LOCAL_MACHINE\Software\Classes\.c]
[HKEY_LOCAL_MACHINE\Software\Classes\.cpp]

And then create/modify the default string (look at the other keys in Classes to see the way it is done).

This registry file should handle your specific needs:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams]
"Settings"=hex:08,00,00,00,04,00,00,00,01,00,00,00,00,77,7e,13,73,35,cf,11,ae,\
69,08,00,2b,2e,12,62,04,00,00,00,01,00,00,00,43,00,00,00

[HKEY_LOCAL_MACHINE\Software\Classes\.h]
@="nppfile"

[HKEY_LOCAL_MACHINE\Software\Classes\.c]
@="nppfile"

[HKEY_LOCAL_MACHINE\Software\Classes\.cpp]
@="nppfile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\nppfile\DefaultIcon]
@=hex(2):25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,\
  00,73,00,25,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,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\nppfile\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00
share|improve this answer
    
Yes I know nLite, it's a great tool, but that won't help if I'm working on a machine where it's already installed. Anyway thanks for the help it's greatly appreciated. So normally I just paste all this into a text file rename it to .reg and it shall work ? –  jokoon Dec 22 '10 at 12:43
    
I could make you a reg if you give me the location that Notepad++ will be installed in :) –  Matthieu Cartier Dec 22 '10 at 12:45
    
by default, "C:\Program Files\Notepad++" –  jokoon Dec 22 '10 at 17:20
    
another problem, when I associate file with notepad++, I can't change one icon without changing all other filetypes that have been associated with notepad++. How do you set extensions icons in the registry ? –  jokoon Dec 22 '10 at 17:21
1  
Added the reg for you. –  Matthieu Cartier Dec 22 '10 at 17:25
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.