.txt extension hijack and zombie macros

Posted by Renquist on Fri 18 Aug 2006 11:17 PM — 7 posts, 25,711 views.

#0
Hello,

I have two issues with MUSHclient. One, I want to use notepad, not MUSHclient as my default text editor. Two, I don't want redundant macros in my world file.

When I installed MUSHclient it registered itself as the default application for '.txt' files. I closed MUSHclient and deleted the {Default} value in "HKEY_CLASSES_ROOT\.txt". However when I restarted MUSHclient it registered itself as the default app again. How do I stop this from happening?

Secondly my world file contains macros for down, who, doing, etc. I closed MUSHclient and deleted these redundant macros from the MCL file, by opening it in notepad. However, once I restarted the client, they just came back. I believe this might have something to do with a default world file, not sure. How do I permanently delete redundant macros from my world file?

I've looked through the FAQ and some of the topics on this forum, but I could not find the answer. Any help would be appreciated.

- Renquist
Australia Forum Administrator #1
Quote:

When I installed MUSHclient it registered itself as the default application for '.txt' files.


I have never seen it do that. Did you get an official copy of MUSHclient from this site? I have installed MUSHclient on a number of PCs (other than the development one) and it nevers hijacks the .txt extension.

Quote:

Secondly my world file contains macros for down, who, doing, etc. I closed MUSHclient and deleted these redundant macros from the MCL file, by opening it in notepad ...


The macros idea was originally implemented as a fixed array of "useful" things, some of which were originally linked to menu items (like down, who etc.). It defaults to hard-coded settings, and then the world file can replace ones. Deleting entries from the world file will not remove the defaults, and in fact there is no script command to do that either, because there are a fixed number of them.

They (who, down, up etc.) don't really do anything, I would just ignore them, or set them to spaces in the GUI configuration.
#2
Well call me silly and file this under pointless bugs. This is a non issue. Here's what’s going on:

If {Default} value in "HKEY_CLASSES_ROOT\.txt" is Null, MUSHclient registers itself as the app for that extension. See below:
<code>
REGEDIT4

[HKEY_CLASSES_ROOT\.txt]
@="MUSHclient.TextDocument" <- here is MC registering itself

[HKEY_CLASSES_ROOT\.txt\shell]

[HKEY_CLASSES_ROOT\.txt\shell\open]

[HKEY_CLASSES_ROOT\.txt\shell\open\command]
@="notepad.exe %1" <- this is the app that would normally get called

REGEDIT4

[HKEY_CLASSES_ROOT\MUSHclient.TextDocument] <- MUSHclient text class added during install
@="Text Document"

[HKEY_CLASSES_ROOT\MUSHclient.TextDocument\shell]

[HKEY_CLASSES_ROOT\MUSHclient.TextDocument\shell\open]

[HKEY_CLASSES_ROOT\MUSHclient.TextDocument\shell\open\ddeexec]
@="[open(\"%1\")]"

[HKEY_CLASSES_ROOT\MUSHclient.TextDocument\shell\open\command]
@="C:\\PROGRA~1\\MUSHCL~1\\MUSHCL~1.EXE \"%1\""
</code>

It's a non issue b/c the default key is not Null in standard windows. The standard windows install sets HKEY_CLASSES_ROOT\.txt\@ = "txtfile", with the 'txtfile' class loading notepad. My registry is different b/c I wanted all text docs, except for .txt, to open in XEmacs. So I set the 'txtfile' class to open emacs, and gave .txt it's own shell/open.

You can duplicate this 'bug' by deleting the default key in HKEY_CLASSES_ROOT\.txt and then starting MUSHclient. If it pops up again, you know what's behind it.

And yes, I got MUSHclient from this site. Just to be sure, I downloaded it again and ran a binary comparison with the version I installed using "fc /B mushclient373.exe mushclient373-2.exe". They are exactly the same.

I'm sad to hear about the default macros. However, they are not a problem, just a nuisance cluttering up the MCL file when I read it in my word processor.

Thanks for the prompt reply,
- Renquist
Australia Forum Administrator #3
The lastest released version is really 3.78. I know it mentions 3.73 on the Downloads page, it must be time to update that. :)

See: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=7257

To avoid the issue of redownloading the installer "just in case" I am now publishing the sumcheck of the installer, see this post for how to check it:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=7280

#4
Thanks for the update.

While installing the newer version I discovered the text fonts in the '\font' directory. What are they used for?

- Renquist
Australia Forum Administrator #5
ASCII art letters in the notepad. See:

http://www.gammon.com.au/scripts/doc.php?command=ASCIIart
#6
That is one *cool* feature :). wow