将STAF安装成windows服务

来源:互联网 发布:君士坦丁十一世 知乎 编辑:程序博客网 时间:2024/05/09 22:02

Set STAF as windows service

If you wish to have STAFProc start automatically on Windows whenthe operating system is rebooted (without requiring a user to logon to Windows),you can install STAF as a Windows service.
These instructions assume you have copied INSTSRV.EXE andSVRANY.EXE (available from the Windows Resource Kit) intoC:\WINNT\SYSTEM32.

Get INSTSRV.EXE and SVRANY.EXEfrom: http://download.csdn.net/source/2248126
1. Create a base STAF service which by default is startedautomatically when the system boots.
instsrv STAF c:\winnt\system32\srvany.exe
2. Start the Windows Registry Editor by typing regedit andfind:
MyComputer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\STAF
3. Create a new string value with the name Description. Set the value to Automatically start STAF service.
4. Create a new Keywith name Parameters. Inside the newkey, create a new string value with the name Application and set the value to c:\staf\bin\stafproc.exe.

 

删除的办法有两个:

办法一: 用sc.exe这个Windows命令

开始——运行——cmd.exe,然后输入sc就可以看到了。使用办法很简单:

sc delete "服务名"  (如果服务名中间有空格,就需要前后加引号)

如针对上面的: sc delete KSD2Service

方法二:直接进行注册表编辑(不推荐)

打开注册表编辑器,找到下面的键值:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services 一般服务会以相同的名字在这里显示一个主健,直接删除相关的键值便可。

 

原创粉丝点击