An alternative approach would be to try and fool MS S&T into thinking the
key already exists and hence that there is no need to try and re-add it.
The success of this would depend on how thoroughly it checks that the
ShellNew key has been correctly added.
So, for example you could delete just the subvalue of ShellNew, which
might be 'NullFile', (or 'config', 'filename', 'command', 'data' ).
After opening the New menu a couple of times, the entry should have
disappeared. That *may* be sufficient to fool the program into thinking
that the key already exists and hence that there is no need to re-add it,
when the program is run. I don't use the program myself, so I can't test
it.
Other possibilities might include (assuming an 'xyz' extension for MS S&T
and that the value of the "(default)" key at
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xyz is 'xyzdefaultvalue' )
(1) Open up the text for the '(default)' key at
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\xyzdefaultvalue
and remove the text (ie double-click it, remove the text and close it)
[NB Don't remove the text for the '(default)' value at
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\xyz ]
OR
(2) Delete this key if it exists and also do step (1)
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\xyzdefaultvalue\FriendlyTypeName
[NB Make suitable exports of the above registry keys, if you wish to
restore them to their original condition later. ]
Jon
P. H. Allen said:
For **every** other Microsoft program (e. g. Word, Excel, PowerPoint,
etc., and others like Adobe Reader, when clicking on the document
template in TweakUI to remove the checkmark, the utility renames the
Shellnew key to Shellnew-. This ends the process of adding the
application to the context menu under "New." However for MS Streets and
Trips, TweakUI actually deletes the key. If I manually rename the key to
Shellnew- in the registry, MS streets and Trips adds a new Shellnew key
adjacent to the renamed Shellnew- key as you have stated below.
I was hoping to find a way to keep the MS S&T application from adding a
new key each time it opens. That hope is becoming the impossible dream.
I guess it is time to say, "uncle."
....... I have been using TweakUI to handle
the problem ..............
.......Those keys can be controlled with an entry which will determine
true(1) or
false(0) and I needed to know how to implement the modification. It
seems
that no one seems to have that knowledge at this newsgroup, or they
are remaining
silent.
Ok, I can see now how you may have gained the impression from TweakUI
that there is a simple on /off switch for 'New menu' entries.
What TweakUI does, when toggling the New menu entry between enabled and
disabled, is to rename the aforementioned 'ShellNew' key, *for a
particular extension* to 'ShellNew-', (ie it puts a hyphen on the end
of it). - thus rendering the registry entry , *for that particular
extension only* invalid.
eg for an extension, say xyz,
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xyz\ShellNew
[or what is the same
HKEY_CLASSES_ROOT\.xyz\ShellNew ]
it is renamed to
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xyz\ShellNew-
To delete the entry it removes the ShellNew key entirely.
When you run TweakUI, as well as noting 'ShellNew' keys, it also
highlights the 'ShellNew-' keys, and presents them to you as disabled
forms of the previous.
However, it would be a simple matter for a program to readd a
legitimate 'ShellNew' key, which is what you are observing.
Jon