Remove Hardcoding of TXT for Notepad

B

Buck Turgidson

Is there a way to disable the default filetype of .txt for Notepad?
Sometimes I want to open a file, e.g. "hosts" with Notepad, and it is
annoying to have to remove the *.txt filter.

Thanks
 
A

Alan

Buck Turgidson said:
Is there a way to disable the default filetype of .txt for Notepad?
Sometimes I want to open a file, e.g. "hosts" with Notepad, and it is
annoying to have to remove the *.txt filter.

Thanks

Use a different editor program that doesn't default to text.
 
M

Mike Williams

Buck said:
Is there a way to disable the default filetype of .txt for Notepad?
Sometimes I want to open a file, e.g. "hosts" with Notepad, and it is
annoying to have to remove the *.txt filter.

I doubt that's possible, but if you're editing HOSTS frequently, just
create a shortcut or batchfile that says "notepad <path>\hosts."
 
K

Keith Miller MVP

Use a hex editor on a copy of notepad, find the first occurrence of:

2A 00 2E 00 74 00 78 00 74 00

edit it to:

2A 00 2E 00 74 00 20 00 20 00
 
B

Buck Turgidson

Thanks. I'll try it. I have 3 different versions. Which one do I edit?



08/04/2004 07:00 AM 69,120 NOTEPAD.EXE
1 File(s) 69,120 bytes

Directory of C:\WINDOWS\system32

08/04/2004 07:00 AM 69,120 notepad.exe
1 File(s) 69,120 bytes

Directory of C:\WINDOWS\system32\dllcache

08/04/2004 07:00 AM 69,120 notepad.exe
1 File(s) 69,120 bytes
 
K

Keith Miller MVP

First & foremost -- Edit a COPY of notepad.exe until you're sure it is functional.

Then rename the current notepad.exe's to notepad.exe.old (or anything else) starting with the copy
in the dllcache directory.

The registry seems to reference both the \Windows\... and the \system32\... copies, so you would
probably want to replace both.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top