为什么某些安装程序需要在运行程序之前重新启动计算机? [英] Why do some installers need to restart the computer before you run the program?

查看:279
本文介绍了为什么某些安装程序需要在运行程序之前重新启动计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始部署桌面应用程序,因此这是我第一次为软件构建安装程序.当前,安装软件后我第一次运行软件时,它崩溃了.在那之后,它运行良好.我仍在调试此问题的过程中,但是我注意到在安装该软件之后,运行该软件之前立即重新启动似乎可以解决此崩溃问题.

I'm fairly new to deploying desktop applications, so this is the first time I'm building an installer for my software. Currently, the first time I run my software after installing it, it crashes. After that, it runs fine. I'm still in the process of debugging this issue, but I've noticed that a reboot immediately after installing and before running the software seems to fix this crash.

某些安装程序要求您在运行软件之前重新启动的常见原因是什么?

What are common reasons that some installers ask you to reboot before running the software?

还有,为什么有些安装程序需要在完成安装之前重新启动?

Also, why do some installers need to restart before finishing the installation?

提前谢谢!

推荐答案

通常,在安装和运行之间重新启动是因为您要替换锁定的系统DLL.安装程序将设置一次运行的注册表项,该注册表项将在启动期间复制DLL,然后再将其锁定Windows,然后您的应用程序可以使用您放下的新DLL.

Generally, reboots between install and running are because you're replacing system DLLs that are locked. The installer sets up a run-once registry entry that copies the DLLs during boot before they're locked by Windows, and then your application can use the new DLL that you laid down.

通常,不建议这样做.安装Windows之后,除了Windows本身以外的任何其他人都没有理由再需要重新启动了.

In general, this is highly discouraged. There should be no reason anymore for anyone other than Windows itself to need to reboot after install anymore.

我建议您回到调试器中,以查找有关您的应用程序崩溃的原因的更多详细信息.希望您的代码中有足够的可用跟踪,以允许进行这种类型的调试.

I'd suggest going back into a debugger to find out more details about why your application is crashing. Hopefully you have enough tracing available in your code to allow that type of debugging.

这篇关于为什么某些安装程序需要在运行程序之前重新启动计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆