机器启动或重新启动时,Exe不会触发 [英] Exe does not trigger when machine starts or reboots

查看:90
本文介绍了机器启动或重新启动时,Exe不会触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Windows应用程序。它将机器事件记录到数据库中。

在应用程序的安装程序中,我进行了更改,以便在注册表编辑器中的以下路径中输入'HKEY_LOCAL_MACHINE \Software \ Microsoft \ Windows \\ Windows \ CurrentVersion \ Run'

这样做是为了让应用程序在启动时触发。



但我发现有些情况当应用程序在启动时不触发时。它大多数时候都会这样做,但有时却没有。
这可能是什么原因?还有什么我应该做的,以确保应用程序在启动时触发?



我尝试过:



我检查了注册表编辑器,而不是在'HKEY_LOCAL_MACHINE \Software \ Microoft \ Windows \ CurrentVersion \ Run'中找到条目,我在'HKEY_LOCAL_MACHINE \\找到它\\软件\ Wow6432Node \ Microsoft \ Windows \ CurrentVersion \ Run',我猜这不是问题。

大多数时候exe会触发,但有时却没有。

解决方案

运行 RunOnce


也可以阻止Windows通过组策略或编辑注册表来处理这些密钥: br />
  • HKLM HKCU
  • 路径: Software\Microsoft \ Windows \ CurrentVersion \Policies
  • DWORD值:(0 =启用,1 =禁用)


    • DisableLocalMachineRun
    • DisableLocalMachineRunOnce
    • DisableCurrentUserRun
    • DisableCurrentUserRunOnce

I have created a windows application. It logs machine events into database.
In the installer for the app, I had made changes such that an entry is made in Registry editor at the following path 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
This was done so that application triggers at startup.

But I have found that there are some cases when the application does not trigger on startup. Most of the times it does, but sometimes it doesn't
What could be the reason for this?? Is there anything else I am supposed to do to ensure the application triggers at startup??

What I have tried:

I have checked the registry editor and instead of finding the entry at 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run' I found it at 'HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run', which I guess is not an issue.
Most of the times the exe triggers, but sometimes it doesn't.

解决方案

The applications specified in the Run and RunOnce commands will not execute if Windows is started in Safe Mode.

It is also possible to prevent Windows from processing these keys through Group Policy or by editing the registry:
  • HKLM or HKCU
  • Path: Software\Microsoft\Windows\CurrentVersion\Policies
  • DWORD Values: (0 = enabled, 1 = disabled)

    • DisableLocalMachineRun
    • DisableLocalMachineRunOnce
    • DisableCurrentUserRun
    • DisableCurrentUserRunOnce


这篇关于机器启动或重新启动时,Exe不会触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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