简体   繁体   English

Windows 7路径直到重启后才由安装设置

[英]windows 7 path not set by install until after reboot

We have a third party driver tool that sets a path to their DLLs during installation. 我们有一个第三方驱动程序工具,可在安装过程中设置其DLL的路径。 On a standard user account in 64-bit Windows 7, the new path is not applied until after reboot or logging off/on. 在64位Windows 7中的标准用户帐户上,只有在重新启动或注销/登录后才应用新路径。

Apparently the path is set at elevated privileges. 显然,该路径设置为提升的特权。 If I run a DOS box as administrator then the new path is there. 如果我以管理员身份运行DOS框,那么新路径就在那里。 If not then not. 如果没有,那就没有。

Seems kind of silly to have to reboot since the new path gets applied anyway. 由于无论如何都应用了新路径,似乎不得不重新启动有点愚蠢。 Why should we have to reboot just for that? 为什么我们必须为此重启?

Does anyone know any way to apply the new path to the standard user without rebooting? 是否有人知道将新路径应用于标准用户而无需重新启动的任何方法?

You need to broadcast the WM_SETTINGCHANGE message with lParam set to the string "Environment". 您需要广播将 lParam设置为字符串“ Environment” WM_SETTINGCHANGE消息

Note that generally speaking the only application that actually pays attention to this is Windows Explorer, so it will usually only affect applications that are launched from Windows Explorer after the change has been made. 请注意,通常来说,唯一真正需要注意的应用程序是Windows资源管理器,因此它通常只会影响进行更改后从Windows资源管理器启动的应用程序。 For example, existing command-line windows will not be affected. 例如,现有的命令行窗口将不受影响。

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

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