是否可以将网络驱动器添加到%PATH%环境变量

发布于 2024-07-30 12:18:24 字数 125 浏览 3 评论 0原文

我有一个调用 exe 文件的 python 脚本。 exe 文件可以与 python 脚本位于同一文件夹中,也可以位于网络驱动器中。 如果exe位于远程驱动器/计算机中,是否可以调用它? 这可以通过设置 %PATH% 变量来完成吗

I have a python script calling an exe file. The exe file can be in the same folder as that of the python script or in a network drive. Is it possible to call the exe if it is in a remote drive/computer? Can this be done by setting the %PATH% variable

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

々眼睛长脚气 2024-08-06 12:18:24

是的,您可以将 UNC 路径放入 %PATH% 环境变量中,如果您可以在当前会话中访问该路径,则它将起作用。

Yes you can put a UNC path in your %PATH% env variable, and it will work if you have access to that path with your current session.

贵在坚持 2024-08-06 12:18:24

尽管使用 UNC 通常可以在 %PATH% 变量中使用,但这不受 Microsoft 支持,因为它可能会导致服务失败等问题。 此问题在 Windows 7/Server 2008R2 中持续存在。

请参考 Microsoft 知识库文章 ID:978856

*干杯

Although use of a UNC will often work in the %PATH% variable this is unsupported by Microsoft as it can cause problems such as service failures. This issue continues through Windows 7 / Server 2008R2.

Please reference Microsoft KB Article ID: 978856

*cheers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文