By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How is this program found?

Yesterday I installed a new program I got off of the web named Notepad++ (it's a much-enhanced version of notepad that doesn't have notepad's line-length limitations for example). But there's something strange (to me at least) going on here: I can run the program in TCC no matter what the current directory is by simply entering a "notepad++" command. Of course this wouldn't be strange if the directory containing the program was in the "path" environment variable, but it isn't according to the standard Windows "where" command. Nor is it a TCC alias (how would it know to create a TCC alias, anyway?). And stranger yet if I run a cmd session from within a TCC session (just by typing "cmd" and hitting enter, of course) and then enter a notepad++ command, I get a "'notepad++' is not recognized as an internal or external command, operable program or batch file." error message - whatever the mechanism for starting the program is in TCC it is only known to TCC. I suppose this isn't important other than it really bugs me when there's something going on with my computer that I don't understand at all even in principle.
Check out the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths. TCC looks in there; CMD doesn't.
Well that's the answer, Vince, so thank you. But what in Windows uses this registry key if cmd doesn't? And where is this registry key documented?
...where is this ... documented?
Windows_NT (even its first version) is a highly complex OS, in some ways much more complex than e.g. VMS (now OpenVMS, one of NT's ancestors). VMS documentation is a pile of more than 10 feet of 3-ring binders, just for the OS and the file system, and it still does not cover everything. Yes, I would like to have my own copy of the whole documentation - yet I know I would not ever look at more than one page out of a thousand!

As to how to find an external (to TCC) program which TCC finds but Windows or some of its components, e.g., CMD, do not, the WHICH command and the @SEARCH[] function of TCC are your friends. You can even use TCC's SHORTCUT command (or Charles Dye's plugin command MKSC) in combination with @SEARCH to create a desktop shortcut to run it!
I almost can't believe I'm saying this :))) but when I was an IBM MVS programmer many years ago, I felt that everything was documented in a much shorter pile than you say was needed for VMS; and I felt I had (and had a good reputation for) having a handle on almost all of it. Now I wlll admit that in many ways operating systems are much more advanced then they were then, but I have to ask how much all of that advancement was really an advancement. If a "feature" is so obscure that nobody knows about it, it really shouldn't be there at all in my opinion.

And Steve, WHICH, @SEARCH, SHORTCUT, and MKSC all tell you some variation of what and where a command is (which I knew), it doesn't tell you how TCC found it there which was the original question.

But thanks to all of you for the above.
Windows_NT (even its first version) is a highly complex OS, in some ways much more complex than e.g. VMS (now OpenVMS, one of NT's ancestors).

Coincidence that WNT is each letter of VMS incremented by one?
Remnants of HAL 9000...

Originally, Windows NT was co-developed between IBM and Microsoft and was initially called OS/2 NT. The NT stood for New Technology. But after IBM and Microsoft divorced, Microsoft took over sole development and renamed it Windows NT. Dave Cutler (if memory serves) was the chief architect of both VMS and Windows NT.
[FOX] Ultimate Translator