• <bdo id='uac83'></bdo><ul id='uac83'></ul>
    <tfoot id='uac83'></tfoot>
  • <small id='uac83'></small><noframes id='uac83'>

      <legend id='uac83'><style id='uac83'><dir id='uac83'><q id='uac83'></q></dir></style></legend>
        <i id='uac83'><tr id='uac83'><dt id='uac83'><q id='uac83'><span id='uac83'><b id='uac83'><form id='uac83'><ins id='uac83'></ins><ul id='uac83'></ul><sub id='uac83'></sub></form><legend id='uac83'></legend><bdo id='uac83'><pre id='uac83'><center id='uac83'></center></pre></bdo></b><th id='uac83'></th></span></q></dt></tr></i><div id='uac83'><tfoot id='uac83'></tfoot><dl id='uac83'><fieldset id='uac83'></fieldset></dl></div>

        Windows 安装程序使用 NT AUTHORITYSYSTEM 而不是登录用户

        时间:2023-05-22
          <bdo id='Wf4gP'></bdo><ul id='Wf4gP'></ul>
            <tbody id='Wf4gP'></tbody>
          • <legend id='Wf4gP'><style id='Wf4gP'><dir id='Wf4gP'><q id='Wf4gP'></q></dir></style></legend>

          • <tfoot id='Wf4gP'></tfoot>

            <small id='Wf4gP'></small><noframes id='Wf4gP'>

              <i id='Wf4gP'><tr id='Wf4gP'><dt id='Wf4gP'><q id='Wf4gP'><span id='Wf4gP'><b id='Wf4gP'><form id='Wf4gP'><ins id='Wf4gP'></ins><ul id='Wf4gP'></ul><sub id='Wf4gP'></sub></form><legend id='Wf4gP'></legend><bdo id='Wf4gP'><pre id='Wf4gP'><center id='Wf4gP'></center></pre></bdo></b><th id='Wf4gP'></th></span></q></dt></tr></i><div id='Wf4gP'><tfoot id='Wf4gP'></tfoot><dl id='Wf4gP'><fieldset id='Wf4gP'></fieldset></dl></div>
                  本文介绍了Windows 安装程序使用 NT AUTHORITYSYSTEM 而不是登录用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个 Windows 安装程序,它在安装过程中创建一个数据库.安装应用程序 CREATE DATABASE 过程失败,因为 Windows 安装程序使用了错误的用户.它使用 NT AUTHORITYSYSTEM 而不是使用登录用户.NT AUTHORITYSYSTEM用户没有创建数据库的权限.

                  I have a windows installer, which is creating a database as a part of the installation process. While installing the application CREATE DATABASE process is failing because the windows installer using a wrong user. It is using NT AUTHORITYSYSTEM instead of using the login user. NT AUTHORITYSYSTEMuser does not have permission to create a database.

                  有没有办法强制安装程序使用登录用户?

                  Is there any way to force the installer to use the login user?

                  在 VS 2017 和 MS Visual Studio 2017 安装程序项目中使用 Windows 10 环境.

                  Using Windows 10 environment with VS 2017 and MS Visual Studio 2017 Installer Projects.

                  推荐答案

                  简短的回答是,您不能在作为 InstallAllUsers 设置的 Visual Studio 设置中执行此操作,因为所有 VS 安装程序生成的自定义操作都作为系统运行帐户.因此,您需要使用 Orca 等编辑工具更改 MSI 文件中的自定义操作设置.您会在 MSI 文件的 CustomAction 表中找到自定义操作,查看 Type 值(可能是类型 3074),然后关闭 msidbCustomActionTypeNoImpersonate 位,以便它以安装用户身份运行.

                  The short answer is that you can't do this in a Visual Studio setup that is an InstallAllUsers setup because the all VS installer generated custom actions run as the system account. Therefore you'd need to change the custom action settings in the MSI file with an editing tool such as Orca. You'd find the custom action in the CustomAction table in the MSI file, look at the Type values (it's probably a type 3074) and then turn off the msidbCustomActionTypeNoImpersonate bit so that it runs impersonated as the installing user.

                  https://msdn.microsoft.com/en-us/library/windows/desktop/aa368069(v=vs.85).aspx

                  请注意,以安装用户身份运行有其自身的一系列问题,因为它与以交互式用户身份运行不同.未加载用户配置文件,因此与用户关联的对象(例如 HKCU、用户配置文件文件夹)非常不可靠.

                  Note that running impersonated as the installing user has its own set of issues because it is NOT the same as running as the interactive user. The user profile is not loaded, so objects associated with the user (such as HKCU, user profile folders) are very unreliable.

                  许多人在第一次启动应用程序时使用单独的程序填充数据库,以便它作为交互式用户正常运行,并且可以作为独立程序进行开发和调试.如果在安装过程中填充失败,您要么放弃安装并回滚,要么继续安装并最终得到一个空数据库,无论如何您可能需要一个程序来填充它.

                  Many people populate the databases with a separate programs the first time the application is launched so that it runs properly as the interactive user and can be developed and debugged as a standalone program. If the populate fails during the install you either give up the install and roll back, or you continue the install and end up with an empty database, for which you might need a program to populate it anyway.

                  这篇关于Windows 安装程序使用 NT AUTHORITYSYSTEM 而不是登录用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我应该如何在 VS 2017 RC 中创建针对 .NET Framework 4.5.1 和 .NET Standard 下一篇:如何将空引用分析的结果写入日志文件

                  相关文章

                1. <legend id='WOP3C'><style id='WOP3C'><dir id='WOP3C'><q id='WOP3C'></q></dir></style></legend>

                2. <i id='WOP3C'><tr id='WOP3C'><dt id='WOP3C'><q id='WOP3C'><span id='WOP3C'><b id='WOP3C'><form id='WOP3C'><ins id='WOP3C'></ins><ul id='WOP3C'></ul><sub id='WOP3C'></sub></form><legend id='WOP3C'></legend><bdo id='WOP3C'><pre id='WOP3C'><center id='WOP3C'></center></pre></bdo></b><th id='WOP3C'></th></span></q></dt></tr></i><div id='WOP3C'><tfoot id='WOP3C'></tfoot><dl id='WOP3C'><fieldset id='WOP3C'></fieldset></dl></div>
                    • <bdo id='WOP3C'></bdo><ul id='WOP3C'></ul>
                    <tfoot id='WOP3C'></tfoot>

                      <small id='WOP3C'></small><noframes id='WOP3C'>