更改启动顺序c#
如何更改启动列表?基本上我有一个程序是一个计算机锁定系统,当我将其输入注册表以在登录时启动时,它就像最后打开的东西一样。
How do I change the startup list? Basically I have a program that is a computer locking system and when I enter it into the registry to start up when login, it is like the last thing to open.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用哪个启动列表来启动您的应用程序?
实际上有相当多的启动列表(见下文)。给定列表中的应用程序启动顺序不可配置(例如,无法选择首先启动启动文件夹中的哪个应用程序),但是,迭代的启动列表是固定的(例如,通用启动文件夹中的应用程序将始终先于启动文件夹中的应用程序启动)。
听起来您想在用户登录时启动应用程序,因此在All Users-Run注册表项中列出您的应用程序路径应该确保它在登录后很快启动。
将字符串 (REG_SZ) 值添加到
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
注册表项,并将应用程序的路径作为数据。(旁白:背景阅读Windows 注册表的晦涩术语)
WINDOWS 9X/ME 的启动顺序
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows \CurrentVersion\RunServicesOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx
)WINDOWS NT4/2000/XP 的启动顺序
(`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute
(
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit
)(
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx
)(来源)
Which startup list are you using to launch your application?
There are actually quite a few startup lists (see below). The order of application launch within a given list is not configurable (e.g. there is no way to choose which application in the Startup Folder launch first) but, the order in which the startup lists are iterated is fixed (e.g. Applications in the Common Startup Folder will always launch first, before applications in the Startup Folder).
It sounds like you want to launch your application on user login, so listing your application path in the All Users-Run registry key should ensure that it launches fairly soon after logon.
Add a string (REG_SZ) value to the
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
registry key with the path to your application as the data.(Aside: Background reading on the arcane terminology of the Windows registry)
STARTUP ORDER FOR WINDOWS 9X/ME
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx
)STARTUP ORDER FOR WINDOWS NT4/2000/XP
(`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute
(
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit
)(
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
)(
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx
)(Source)