简体   繁体   English

Lua环境注册表?

[英]Lua registry for environment(s)?

I'm trying to read the windows registry to figure out what scripting environments are installed and where the stand alone interpreter executables are available. 我正在尝试阅读Windows注册表,以确定安装了哪些脚本环境以及可用的独立解释器可执行文件的位置。

When I did python, for example, I searched for 例如,当我做python时,我搜索了

HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/InstallPath HKEY_LOCAL_MACHINE / SOFTWARE / Python的/ PythonCore /安装路径

This gives me the install path for the python executable for the environment, this allows me to find if I have python 2.7, 3, etc and where those exes are. 这给了我环境的python可执行文件的安装路径,这允许我找到我是否有python 2.7,3等,以及那些exes的位置。

I'm looking for something similar for Lua for windows. 我正在寻找类似于Lua for windows的东西。

I must use the registry for this search. 必须使用注册表进行此搜索。

What Nicol said. 尼科尔说。 You will be better served by scanning PATH against the list of known executables (but even that is not a guarantee as many of my local installs are not in PATH). 通过针对已知可执行文件列表扫描PATH可以更好地服务(但即使这不是保证,因为我的许多本地安装都不在PATH中)。 Still, I think there is a better chance of finding those scripting engines that don't leave their traces in the registry. 尽管如此,我认为找到那些不会在注册表中留下痕迹的脚本引擎的可能性更大。 Or maybe use a combination of mechanisms. 或者可以使用机制的组合。

Lua does not have an install path. Lua没有安装路径。 Lua does not have an installation . Lua没有安装 Lua is not like Python, with an installer that puts everything in one specific place and sets up registry and PATH entries and such. Lua不像Python,安装程序将所有内容放在一个特定的位置,并设置注册表和PATH条目等。

The standalone interpreter does not have a mechanism to query its location. 独立解释器没有查询其位置的机制。 If you're interested in learning the Lua version, you can always check the _VERSION variable field. 如果您对学习Lua版本感兴趣,可以随时查看_VERSION变量字段。 But other than that, no, there is no mechanism for doing what you want. 但除此之外,没有,没有机制可以做你想做的事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM