Re: Suggestion for Win O/S: MIKTEX_BIN environment variable
STF <[email protected]>
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Message-ID | <CANsMTYU3uUfxAnrGi+BBpdEi4-6JgtA1+gs_r20L2o_hHE0aOg@mail.gmail.com> |
On 31 October 2013 21:26, Jerry <[email protected]> said: > > Most of that information is recorded in the "Registry". That is where > many installers look for just the information that you are talking > about. I knew that already. Well, as a matter of fact, they don't match exactly what I was talking about. Let me ask you a question: Did you record the bin directory in registry? I mean the path that stops at the "\" character, something like "C:\Program Files\MiKTeX 2.9\miktex\bin\x64*\*" but nothing else? I can answer for you, the answer is *No*. 2nd question: did you record those information in the mostly expected registry key, ie HKEY_LOCAL_MACHINE\SOFTWARE\MiKTeX.org\MiKTeX? Once again, I can answer for you and the answer is still *No* Actually, if you could provide the bin path in registry, it's still better than nothing (more on this point below) Would you consider providing it? > Programs like "TeXstudio" have no problem finding where MiKTeX > is hiding whether it is a 32 or 64 bit system or a 32 bit install on a > 64 bit system. I can confirm that. It depends on your definition of "no problem", ie that doesn't mean they are able to do it without difficulties. I'm pretty sure they have to *hack* one of the paths to some exe or dll file to get the path up to the "\" character. For example, I had found this key: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MiKTeX.dvi.2.9 But think about it, when MiKTeX version changes to say 3.0, their hack would not work anymore. Well, unless they had anticipated this and cast a "wide net" to include all possibilities for HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MiKTeX.dvi.x.y Nevertheless, this is still a heck and personally, if I needed to program an exhaustive search like this, I wouldn't employ the words "no problem" to describe the work I had to provide to get to the result. > It sounds to me like the EqualX > installer either doesn't check or is improperly configured. Again, I > have no idea what they are using for an installer. > No, it has nothing to do with installer. Or at least, it is not necessarily related to the installer -- it is a runtime config issue. Between registry and environment variable, it's preferable to use env var. Suppose such variable is defined: * we don't need special function/API to get registry keys and values. In batch files as well as in dynamic expansion, one only needs to use %xxxxxx% and that's it! You see how convenience that is? * Especially in batch file, AFAIK, we need to write several lines of codes (or equivalently a long instruction) to get a value from a registry key. And that's very prone to error. Very inconvenient. * Using env vars is more Unix-like style * If a program (or batch file) is using env vars dynamic expansion (ie %xxxxxx%), users can install a newer versions of MiKTeX without fearing that dependent programs might be broken because the var is always pointing to the good directory and the variable is evaluated at runtime. But once again, if you could provide registry key to the path only, it's still good. ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk