更改启动顺序c#

发布于 2024-08-12 11:54:55 字数 67 浏览 9 评论 0原文

如何更改启动列表?基本上我有一个程序是一个计算机锁定系统,当我将其输入注册表以在登录时启动时,它就像最后打开的东西一样。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄意 2024-08-19 11:54:55

您使用哪个启动列表来启动您的应用程序?

实际上有相当多的启动列表(见下文)。给定列表中的应用程序启动顺序不可配置(例如,无法选择首先启动启动文件夹中的哪个应用程序),但是,迭代的启动列表是固定的(例如,通用启动文件夹中的应用程序将始终先于启动文件夹中的应用程序启动)。

听起来您想在用户登录时启动应用程序,因此在All Users-Run注册表项中列出您的应用程序路径应该确保它在登录后很快启动。

将字符串 (REG_SZ) 值添加到 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run 注册表项,并将应用程序的路径作为数据。

(旁白:背景阅读Windows 注册表的晦涩术语)

WINDOWS 9X/ME 的启动顺序

  1. config.sys
  2. autoexec.bat
  3. wininit.ini
  4. winstart.bat
  5. system.ini
  6. win.ini
  7. 所有用户-RunOnce (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows \CurrentVersion\RunServicesOnce)
  8. 所有用户-RunServices
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices)
  9. 所有用户-RunOnce
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  10. 所有用户-运行
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run)
  11. 所有用户-RunOnceEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  12. 所有用户-RunEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx)
  13. 当前用户-RunOnce
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  14. 当前用户运行
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run)
  15. 当前用户-RunOnceEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  16. 当前用户-RunEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx)
  17. 通用启动文件夹
  18. 启动文件夹

WINDOWS NT4/2000/XP 的启动顺序

  1. BootExecute
    (`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute
  2. Services
  3. 用户输入密码并登录系统
  4. UserInit
    (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit)
  5. Shell
    (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell)
  6. 所有用户-RunOnce
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  7. 所有用户-运行
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run)
  8. 所有用户-RunOnceEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  9. 所有用户-RunEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx)
  10. 当前用户-RunOnce
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  11. 当前用户运行
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run)
  12. 当前用户-RunOnceEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  13. 当前用户-RunEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx)
  14. 通用启动文件夹
  15. 启动文件夹

(来源

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

  1. config.sys
  2. autoexec.bat
  3. wininit.ini
  4. winstart.bat
  5. system.ini
  6. win.ini
  7. All Users-RunOnce (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce)
  8. All Users-RunServices
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices)
  9. All Users-RunOnce
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  10. All Users-Run
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run)
  11. All Users-RunOnceEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  12. All Users-RunEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx)
  13. Current User-RunOnce
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  14. Current User-Run
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run)
  15. Current User-RunOnceEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  16. Current User-RunEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx)
  17. Common Startup Folder
  18. Startup Folder

STARTUP ORDER FOR WINDOWS NT4/2000/XP

  1. BootExecute
    (`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute
  2. Services
  3. User enters a password and logon to the system
  4. UserInit
    (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit)
  5. Shell
    (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell)
  6. All Users-RunOnce
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  7. All Users-Run
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run)
  8. All Users-RunOnceEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  9. All Users-RunEx
    (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunEx)
  10. Current User-RunOnce
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce)
  11. Current User-Run
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run)
  12. Current User-RunOnceEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx)
  13. Current User-RunEx
    (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunEx)
  14. Common Startup Folder
  15. Startup Folder

(Source)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文