大家都关注的问题!

chuanshuo2 2001-11-11 12:56:25
如何编程实现自己的程序在系统启动后最先运行?并且按trl+alt+del看不见?
...全文
68 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
vBin 2001-11-11
  • 打赏
  • 举报
回复
如何是在2000里无法做到.
在98里只要将其注册系统服务就可以啦.
让他先运行,只能放到注册表中啦.

zara 2001-11-11
  • 打赏
  • 举报
回复
应该是RunServices而不是RunServicesOnce.
CNer 2001-11-11
  • 打赏
  • 举报
回复
98里,可以这样,
添加到注册表的

run子键和RunServicesOnce里,

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

RunServicesOnce的优先权高,

在名称栏里,用特殊字符开头,这样,你的程序启动的时候,比别的程序快那么一点点。哈哈。
或者,你可以让别的程序暂时停一停。。。。。
调用api吧!
2000下,我不是很清楚,,,,
chuanshuo2 2001-11-11
  • 打赏
  • 举报
回复
那么如何编程实现自己的程序在系统启动后最先运行?
vBin 2001-11-11
  • 打赏
  • 举报
回复
总之还是调用API函数 RegisterServiceProcess
vBin 2001-11-11
  • 打赏
  • 举报
回复
在汇编中可以这样写,以前有此贴的

--------------------------------------
Hiding your program from the Ctrl+Alt+Del list
-----------------------------------------------------------------------------
By Bill T.
Thursday, June 24, 1999


Introduction:
-----------------------------------------------------------------------------

Here's a question that I have seen a lot. To accomplish this, you need to
resister the program as a service, by passing its process ID to the
RegisterService() function.

This method makes use of the API GetProcAddress to get the function pointer
for RegisterServiceProcess API. This function pointer is then used to call
the RegisterServiceProcess function.



Hiding the Application:
-----------------------------------------------------------------------------

; defined in the data section
szKernel32 db "Kernel32.dll",0
szRSP db "RegisterServiceProcess",0

; code to hide application from alt+ctrl+del
push offset szKernel32
call GetModuleHandle ; get the handle of kernel32.dll
push offset szRSP
push eax
call GetProcAddress ; get the address of the function
mov ebx, eax ; save the pointer into ebx

call GetCurrentProcessId ; get the current process's id

push 1 ; 1 = Register as Service
push eax ; process id
call ebx ; call RegisterServiceProcess



Cleaning Up:
-----------------------------------------------------------------------------

You should always call RegisterServiceProcess again (using the previously
described methods), but instead passing a 0 for the dwType argument, so that
your program will unregister itself, and frees up its resources.

; code to un-hide application from alt+ctrl+del
push offset szKernel32
call GetModuleHandle ; get the handle of kernel32.dll
push offset szRSP
push eax
call GetProcAddress ; get the address of the function
mov ebx, eax ; save the pointer into ebx

call GetCurrentProcessId ; get the current process's id

push 0 ; 0 = UnRegister as Service
push eax ; process id
call ebx ; call RegisterServiceProcess


RegisterServiceProcess:
-----------------------------------------------------------------------------

The RegisterServiceProcess function registers or unregisters a service
process. A service process continues to run after the user logs off.

To call RegisterServiceProcess, retrieve a function pointer using
GetProcAddress on KERNEL32.DLL. Use the function pointer to call
RegisterServiceProcess.


DWORD RegisterServiceProcess(
DWORD dwProcessId,
DWORD dwType
);

Parameters

dwProcessId
Specifies the identifier of the process to register as a service
process. Specifies NULL to register the current process.

dwType
Specifies whether the service is to be registered or unregistered.
This parameter can be one of the following values.

Value Meaning
0 Unregisters the process as a service process.
1 Registers the process as a service process.

Return Values

The return value is 1 if successful or 0 if an error occurs.




21,459

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧