Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Windows XP
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard network printer problem ram registry router security slow software sound toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows XP >
Registry hack to nuke notepad?

Reply  
Thread Tools
brianpatrick's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Feb 2009
Experience: Advanced
17-Feb-2009, 01:18 PM #1
Registry hack to nuke notepad?
Hi,
I hate notepad. It mangles my Linux files and is a 25 year old program which has never been updated. Every time I double-click a file associated with it in the registry, I have to:
  1. go to explorer ->
  2. tools ->
  3. folder_options ->
  4. file_types
  5. scroll down through the ~486 file types to find the right one
  6. click change
  7. hit browse (because my favorite editor is non-ms)
  8. navigate to c:/program_files/vim/vim72
  9. double-click on gvim.exe
  10. check "always use the selected program ..." box
  11. click OK on open_with dialog
  12. click close on folder_options dialog.
There are over a dozen extensions I use and need to do this for so we are talking about hundreds of steps involved.

Is there a program out there to search for all occurrences of notepad (or textpad) in the registry's file associations and overwrite it with gvim?

I have seen other hacks on the web where you boot into safe mode, overwrite the notepad in dllcache, servicePackFiles, system32, windows, ... then hack the registry's install sources, servicepacksources, sourcepath, ... and then hack in a dozen or so registry keys with huge, raw, hex text arrays. Egad! What a convoluted kludge of engineering malpractice this architecture is!
http://www.ditii.com/2007/10/12/how-...-party-editor/

The truly sad part of this entire, unnecessary exercise is that it can all be done with 1 line in Linux:
echo "export editor=vim" >> ~/.bashrc; . ~/.bashrc

Is there a better way to do this other than brute force mousing or hacking a Perl script to search and destroy notepad?

Thank you,
BrianP
Tbird885's Avatar
Computer Specs
Member with 62 posts.
 
Join Date: Jul 2007
Location: London UK
Experience: Intermediate
17-Feb-2009, 01:21 PM #2
All you have to do is rename your favoured text editor to notepad.exe, and use it to replace the original notepad.exe.
brianpatrick's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Feb 2009
Experience: Advanced
17-Feb-2009, 01:30 PM #3
TBird,
Will Uncle Bill let you mess with his files without going through his tools?

From: http://support.microsoft.com/kb/236995
Windows File Protection (WFP) protects operating system files from being replaced by third-party programs or being accidentally deleted. When a file that is protected by this process is deleted or overwritten, WFP automatically replaces the file with the original version.

I don't think it is that simple with xp/sp3. Hope I'm wrong.

BrianP
Tbird885's Avatar
Computer Specs
Member with 62 posts.
 
Join Date: Jul 2007
Location: London UK
Experience: Intermediate
17-Feb-2009, 01:35 PM #4
Uncle Bill will give you a warning which you can choose to ignore.
Tbird885's Avatar
Computer Specs
Member with 62 posts.
 
Join Date: Jul 2007
Location: London UK
Experience: Intermediate
17-Feb-2009, 01:49 PM #5
Hah! my bad.. the replacement will not survive a reboot.
1002richards's Avatar
Computer Specs
Senior Member with 4,542 posts.
 
Join Date: Jan 2006
Location: Sussex, UK
Experience: Intermediate
17-Feb-2009, 03:09 PM #6
Hi,
Have you tried this tutorial at Bleeping Computer:
http://www.bleepingcomputer.com/tuto...torial126.html

Scroll down the page to pass by the ads.

Richard
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
17-Feb-2009, 03:18 PM #7
Why not just right click the file and do an open with, chose program and then check the box that says "Always use this program to open this file type".

There is a cmd line program to set file associations. If you know all the file types you need associated to VIM, then you can write a batch file to set them all in one shot.

I could have sworn that the VIM for Windows I had used years ago had a setting for file associations in the program. Maybe I was using a different one than you are using.
brianpatrick's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Feb 2009
Experience: Advanced
17-Feb-2009, 06:57 PM #8
RE: Registry hack to nuke notepad?
Hi,
There is an hkey_class_root -> applications -> notepad.exe key. It has both an edit and an open subkeys which both point to a command:
%SystemRoot%\system32\NOTEPAD.EXE %1

I am wondering if I can hack these 2 keys and replace this path with Gvim's path. The effect would be an alias.

The standard warning about "backup your entire system before monkeying with the registry" really does apply. I have killed more than one system with manual registry hacks. It is a fragile, feeble house of cards which can crumble to dust for no apparent reason leaving your system unusable.

Would this hack be safe? Does windoz use it under the cover which might crash the entire os? Where is the command line application you recommended?

I found ms `assoc` (http://support.microsoft.com/kb/323526):
C:\>assoc | grep txt
.log=txtfile
.scp=txtfile
.txt=txtfile
.wtx=txtfile

It lets you define what a txtfile is, but what does it do with a "txtfile"?

I also found `fileasoc`. It goes into a good amount of detail about how windoz opens files, but has no usage or command line detail. The thought of randomly installing program to see what they do is somewhat risky. This is a primary avenue for letting malware in the front door.

What I actually need is reg.search.replace.pl notepad gvim <enter>, but I can't find it. Anybody seen or written it?

Thank you,
BrianP
IMiteBable2help's Avatar
IMiteBable2help has a Photo Album
Computer Specs
Senior Member with 1,003 posts.
 
Join Date: Nov 2001
Location: 172 Miles S of Microsoft Corp
Experience: Advanced but no Expert
17-Feb-2009, 07:38 PM #9
Why not just change the file associations for .TXT files? Make them open with your preferred program. It's a lot easier than going through all that other crap you're talking about. Not only is it easier, but it's the correct way to do it.
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
17-Feb-2009, 11:19 PM #10
To do it in a batch file you would need to use a combination of ftype and assoc.
rbalaji's Avatar
Computer Specs
Member with 328 posts.
 
Join Date: Feb 2009
Location: Chicagoland
Experience: Intermediate
17-Feb-2009, 11:26 PM #11
Simple solution. Go to file explorer and click on tools->options. Choose file types and then click on the "file types" column. This will sort by that column and will group all text files together. These are the files that are associated with notepad. Now, click on one of them and choose "advanced", not change (change will allow you to change the association of one extension, advanced allows you to change the actions associated with all files that are classified as "text files"). It will come up with a new window that has the name in a box on top (editable) and then a set of actions in the bottom pane. Click on open, then the edit button. Change the program that is used to open text files and the settings will be transmitted to all files of type "text files", not just the one extension from where you started.
__________________
Balaji Ramanathan
-----------------------------------------
Fail-safe systems do
Operating systems don't
-----------------------------------------
Reply

Tags
notepad, registry, replace, vim, winxp

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:31 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.