You should find here some freewares I have made.
Briefly, it's a program designed to redirect calls to Window's Notepad to a program of my choice.
In other words, this is a replacement for notepad.exe or other programs that are unconditionally launched by another application. I originally wrote this for my own use, particularly when I would use the View Source command in Internet Explorer.
You may need it if you are tired of viewing the source of Web pages in IE
using Notepad.
ProgLauncher allows you to use the text editor of your choice,
be it a lightweight Notepad alternative (like Metapad
or The Gun),
a lightweight syntax highlighting editor (like SciTE),
or even a big HTML editor which can't be moved from its installation directory.
You can also use it to redirect calls to any program made by any application
which doesn't allow its users to choose which program to use.
These programs can be text editors, of course, but could also be image viewers,
diff utilities, etc.
Another advantage: you may be updating your editor often, and have several
versions or copies of Notepad.
For example, I contribute to the open-source SciTE editor project, so I always
have a fresh copy in the development directory, a copy in Program Files,
as well as copies in the Win98 and WinNT directories (I use a dual-boot system),
which also have copies of Notepad; that's 4 copies of SciTE to keep updated.
I had a batch file to update all these copies, but that was quite a hassle.
Now, using ProgLauncher, I just have to update the main copy of my editor and
I no longer touch the files in my system directories.
Here:
ProgLauncher 1.1 (less than 27KB).
The source code is distributed with it, but you really need only
ProgLauncher.exe and NotePad.cfg (to rename and/or edit, as explained below).
Since its aim is to replace the binary of the program that is run, you must first
rename the old program, say <ProgramName>.exe becoming <ProgramName>_old.exe,
or you must move it to another directory.
I recommend that you keep a copy in case you change your mind or if you someday
need to launch the standard version.
Once you've renamed or moved the original program,
then rename ProgLauncher.exe to <ProgramName>.exe (eg. rename it NotePad.exe)
and move it to the directory where the old program was located.
Now, when your application tries to run the old program it will instead launch
the disguised ProgLauncher, which in turn will run your chosen program.
This choice is defined in the <ProgramName>.cfg file (eg. NotePad.cfg),
found in the same directory as the .exe file.
This file has three lines (extra lines are ignored and can contain comments):
/p foo Bar.txt
goes as /p "foo Bar.txt"
,
but /w 4 gah.cfg
goes as /w "4 gah.cfg"
/p goo.ini /i
goes as /p "goo.ini /i"
, which will be incorrect.
Note 1: in old Win95 versions, the system keeps track when notepad.exe is renamed, and will continue to call the old EXE! In this case, you have to make a copy for backup, instead of renaming it, and overwrite the old file.
Note 2: in new Windows versions (namely Windows 2000 and newer), the system is auto-repairing, i.e. if it notices you have changed a system file (and Notepad is one of them), it will restore the original file.
Workaround found in Lockergnome:
Those who pay attention to the GnomeREPORT know that I've replaced Notepad with Metapad as my default text editor (which came from welcome.to/metapad). In Windows 98, I simply renamed the binary and threw it into my Windows folder. When I tried to do the same in Windows 2000, the operating system wouldn't let me. Within seconds, it would reverse my replacement. What!? That's a nice safeguard, but I really wanted to use the Metapad binary. In a matter of minutes, I discovered that files in the "WINNT \ system32 \ dllcache" folder were my problem. Upon replacing its copy of Notepad with the Metapad binary, I was saved. Of course, not before being warned about the issues which may have come up (which haven't yet). Now, if you care to stop this auto-recovery from ever happening again, you'll need to launch your registry editor. Navigate to "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon" and look for the "SFCDisable" DWORD value. Set it to "1" and you'll be good to go.
Note 3: in Windows NT 4, Notepad can be found in two locations: C:\WinNT\ and C:\WinNT\System32 (if it is installed in the default directory; otherwise replace C:\WinNT by whatever it is in your system). You have to replace both copies, as either one can be called.
Many thanks to Mark A. Craig which proofread this text and corrected my bad grammar! If you find a typo, it is likely that I edited it afterward...