你要将自动启动放在Explorer启动之前即可。
你可以运行系统信息,然后查看启动选项,再看在资源管理器运行前的都是些什么程序是否有可参加进去。
对于win98,这类系统只要在System.ini中的Shell=explorer前面加上你的要运行的程序即可。
2000需要稍作研究。
供参考!

解决方案 »

  1.   

    如果是DOS下,还有 %windows%\winstart.bat
      

  2.   

    写在注册表RunServices下可以在登录框出现之前运行
      

  3.   

    Option Explicit
    ''---------------处理注册表的函数-----------------------
    Private Declare Function RegCreateKey& Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey&, ByVal lpszSubKey$, lphKey&)
    Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As LongConst HKEY_LOCAL_MACHINE = &H80000002
    Const REG_SZ = 1''HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    Private Sub Command1_Click()
        ''声明变量
        Dim sKeyName As String, sKeyValue As String, sKeyValueIcon As String
        Dim Ret As Integer, lphKey As Long    sKeyName = "Software\Microsoft\Windows\CurrentVersion\Run"
        sKeyValue = App.Path & IIf(Len(App.Path) > 3, "\" & "form1.exe", "form1.exe")
        Ret = RegCreateKey&(HKEY_LOCAL_MACHINE, sKeyName, lphKey)
        Ret = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)End Sub
      

  4.   

    。  Windows NT的服务都是通过一般的可执行程序实现的,不同的是,它遵循内部的一个特定协议来设计,以便它们能够与服务控制管理器(SCM,Service Control Manager)进行正确的交互。在这篇文章中,你将学习到如何在Windows NT中创建和安装简单的Win32服务。一旦你懂得了这个简单的服务,你要建立自己的服务也不难了,因为所有的服务,不论是如何地复杂,都必须包含有同样基本的SCM接口代码。只要符合SCM的要求,其实为服务设计的可执行文件和一般的程序并没有多少的区别。
      

  5.   

    以下内容是从网上找到的,看看对你是否有帮助!!在windows98下自动启动程序的10种方法      大家好!整理了一些在windows下自动启动程序的方法给大家。    1. Autoexec.bat
           在DOS下每次自启动    2. Win.ini
           [windows]
           load=file.exe
           run=file.exe    3. System.ini
           [boot]
           Shell=Explorer.exe file.exe    4. c:\windows\winstart.bat
           看似平常,但每次都重新启动    5. Autostart 文件
           C:\windows\start menu\programs\startup {chinese/english}
           C:\windows\Menu D閙arrer\Programmes\Darrage {french}
           在注册表中的位置: 
           HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
           Folders Startup="C:\windows\start menu\programs\startup" 
           所以它将很容易被程序更改    6. Registry键
           [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
           [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
           [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
           [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
           [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
           [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
           [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices]    7. c:\windows\wininit.ini
           一旦运行就被windows删除,安装的setup程序常用
           Example: (content of wininit.ini)
           [Rename]
           NUL=c:\windows\picture.exe
           例子:将c:\windows\picture.exe设置为NUL, 表示删除它,完全隐蔽的执行!
        8. Registry Shell Spawning (使用过Subseven吗?看看吧)
           [HKEY_CLASSES_ROOT\exefile\shell\open\command] @="\"%1\" %*"
           [HKEY_CLASSES_ROOT\comfile\shell\open\command] @="\"%1\" %*"
           [HKEY_CLASSES_ROOT\batfile\shell\open\command] @="\"%1\" %*"
           [HKEY_CLASSES_ROOT\htafile\Shell\Open\Command] @="\"%1\" %*"
           [HKEY_CLASSES_ROOT\piffile\shell\open\command] @="\"%1\" %*"
           [HKEY_LOCAL_MACHINE\Software\CLASSES\batfile\shell\open\command] 
           @="\"%1\" %*"
           [HKEY_LOCAL_MACHINE\Software\CLASSES\comfile\shell\open\command] 
           @="\"%1\" %*"
           [HKEY_LOCAL_MACHINE\Software\CLASSES\exefile\shell\open\command] 
           @="\"%1\" %*"
           [HKEY_LOCAL_MACHINE\Software\CLASSES\htafile\Shell\Open\Command] 
           @="\"%1\" %*"
           [HKEY_LOCAL_MACHINE\Software\CLASSES\piffile\shell\open\command] 
           @="\"%1\" %*"       这些"%1 %*"需要被赋值, 如果将其改为 "server.exe %1 %*",
           server.exe将在每次启动时被执行,这些exe/pif/com/bat/hta等文件都可被执行    9. Icq Inet
           [HKEY_CURRENT_USER\Software\Mirabilis\ICQ\Agent\Apps\test]
           "Path"="test.exe"
           "Startup"="c:\\test"
           "Parameters"=""
           "Enable"="Yes"       [HKEY_CURRENT_USER\Software\Mirabilis\ICQ\Agent\Apps\
           当icq发现网络连接时,将被执行(我使用的icq2000b的键值有所不同,但您可以自行查找)
           您发现OICQ有这方面的问题吗?^_^...    A. 杂项说明
           找找以下的键值:
           [HKEY_LOCAL_MACHINE\Software\CLASSES\ShellScrap] 
           @="Scrap object" "NeverShowExt"=""       NeverShowExt 键 可以隐藏SHS文件的扩展名.shs
           如果你将一个文件改名为:"abc.jpg.shs" 它只显示"abc.jpg"
           如果你的注册表里有很多NeverShowExt键值,删除他们。    注意:
            这些方法不能全部适应Win2K,但您可以自行检测。