机器启动或重新启动时,Exe不会触发

编程入门 行业动态 更新时间:2024-10-25 08:19:47
本文介绍了机器启动或重新启动时,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
  • 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不会触发

本文发布于:2023-10-28 19:50:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537608.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:启动时   机器   Exe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!