Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default opening with notepad or wordpad 1

Status
Not open for further replies.

Swamphen

Programmer
Jul 17, 2001
84
IT
I just changed from Windows 98 to Windows 2000.

In Windows 98 I changed my registry so that all files with extensions not attached to a specific program and all files without any extension were automatically opened in Notepad when doubleclicking them in Windows Explorer.

Now I can't seem to find how to achieve this in Windows 2000.

Any ideas?

Swamphen
 
Imay be wrong ..but if you hit the left shift key or is it ctrl ket...one of these will bring up a menu with open with...when you right click it.....then select always open with this program.....I may be wrong....

CS ***************
***************
 
Thanks. That's true.

But unfortunately I knew that, and unfortunately that's not exactly what I want.

In Windows 98 you could put a shell/notepad/command- key under HKR/* and the value of the command key would be the location of notepad.exe . That way just clicking on an unknown file or even a file without any extension would open it in notepad.

Three reasons why I want to do it this way:

- you can't choose to always open a file without an extension with a certain program.

- the registry will be clogged with extension-couplings which are not really exact and maybe you will have to get rid of those afterwards (although a new installation will probably just override those couplings).

- it would be more esthetical to do it my way.


Anyone else an opinion?
 
Hello, Swanphen.

I understand what you are after. I would offer you an alternative, which is the much more prudent way to open file, that instead of double-click, the setting below allows you to right-click on any un-associated file type and choose to open the file by notepad from the context menu. It is still two-click away. But instead of doubleclick on files you may regret, it offers the same functionality only giving you a chance to retrack and see clearly you are to open it with notepad.

Go to registry, and look for the key
[HKEY_CLASSES_ROOT\Unknown]

From the above see, see if you have the subkey chain below, if not, create them successively, namely,
[HKEY_CLASSES_ROOT\Unknown\shell\Notepad\Command]

After create, if necessary, the chain up to \Command\, you sure will find an entry called default, denoted as @ below. Now, edit by given the default entry the value :

@="C:\\Winnt\\Notepad.exe %1"

Note : If you are editing registry by hand, neglect the double-quote(") and \\ should be understood as single backslash, ie,

C:\Winnt\Notepad.exe %1

Exit registry and the effect of the setting is immediate.

regards - tsuji
 
Thanks Tsuji.

The unknown-key was unknown to me :).
I actually did the same thing, but then under the *-key. That way a "notepad" option appeared for each and every extension.

But now I would still like to make Notepad the default opening method for those unknown extensions.

2 reasons:

- it is faster, I hate right-clicking
- you can open multiple unknown-extension files at the same
time.

Since I do a lot of secure copying from ssh-servers on Linux computers there are a lot of those unknown-extension files which are mainly textfiles. So, it is not a total waist of time to try to optimize their opening.

greetings,
swamphen
 
A simpler way for those who don't wish to reghack is to have notepad in your quick launch bar. Drop the no extension file on the icon.
 
Hello, Swamphen.

If that is what you really want, it can be done by simply changing the name of the subkey. Instead of constructing the subkey chain:

[HKEY_CLASSES_ROOT\Unknown\shell\Notepad\Command]

replace the name Notepad by Open:

[HKEY_CLASSES_ROOT\Unknown\shell\Open\Command]

That is all you have to do. Set the same value as my previous posting to the default, namely,
@="C:\\Winnt\\Notepad.exe %1"

And now, you get the doubleclick you want.

regards - tsuji
 
You are getting there, but it doesn't work yet unfortunately.

Now, in the context menu, I have two "Open"-options. The default option (the one in bold), is one of those "Open"-options, but alas, not the "notepad-open". The default "Open" does the same as "Open with": you are asked to choose an application to start the file with.

Thanks a lot for the efforts until now...

Swamphen
 
Hello again.

Openas (meaning open with) and Open are both canonical verbs. There seems to be some priority change in win2000 vs win9x.

To rectify the situation and at the same time preserve all the settings of your system which one day you might reverse back, I would suggest simply you change your openas to open_as (which is then no longer a canonical verb). That means change the subkey name:

[HKEY_CLASSES_ROOT\Unknown\shell\openas]

to

[HKEY_CLASSES_ROOT\Unknown\shell\open_with]

The result would be you still preserve you "open with" in the rightclick context menu which now display as customized "open_with". Whereas, Open will be the default action allowing doubleclick.

regards - tsuji
 
And this one finally gave you the star which you really deserved.

Thank you!

Never would have figured this one out myself.

Swamphen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top