java.util. 无法引入:如何创建用户定义的服务
来源:百度文库 编辑:偶看新闻 时间:2024/04/28 04:34:19
在 Windows NT 资源工具包提供了两个实用程序,您可以创建一个 Windows NT 用户定义的服务的 Windows NT 应用程序和某些 16 位应用程序 (而不是批处理文件)。
To create a Windows NT user-defined service, perform the following steps:
- From the Services applet in Control Panel
- From a MS-DOS command prompt, type the following:
NET START
- Use the Sc.exe utility from the Resource Kit. Type the following from a MS-DOS command prompt:
\Sc.exe start
where is the drive and directory of the Windows NT Resource Kit (i.e., C:\Reskit).
For more information on installing and removing a user-defined service,please see the Srvany.wri document provided with the Windows NT ResourceKit utilities (i.e., C:\Reskit\Srvany.wri). This document can also be foundon the Windows NT Resource Kit CD in the Common\Config directory.
_______________________________________________________
若要进行 Windows NT 用户定义的服务执行以下步骤:
-从在控制面板中的服务小程序
-从 MS-DOS 命令提示符处键入以下内容:
NET START < 我服务 >
-使用 Sc.exe 实用程序从资源工具包。键入从 MS-DOS 命令提示符下以下内容:
\Sc.exe 开始 < 我服务 >
所在的驱动器和目录的 Windows NT 资源工具包 (即,C:\Reskit)。
有关安装和删除用户定义的服务的详细信息,请参阅 Srvany.wri 文档提供与 Windows NT 资源工具包实用程序 (即,C:\Reskit\Srvany.wri)。此外可以在 Common\Config 目录中的 Windows NT 资源工具包光盘上找到此文档。
To create a Windows NT user-defined service, perform the following steps:
- At a MS-DOS command prompt(running CMD.EXE), type the following command:
path\INSTSRV.EXE My Service path\SRVANY.EXE
where path is the drive and directory of the Windows NT Resource Kit (i.e., C:\RESKIT) and My Service is the name of the service you are creating.
Example:C:\Program Files\Resource Kit\Instsrv.exe Notepad C:\Program Files\Resource Kit\Srvany.exeNOTE: To verify that the service was created correctly, check the registry to verify that the ImagePath value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name is set to point to SRVANY.EXE. If this is not set correctly, the service will stop shortly after it starts and return an Event ID 7000 "The service name failed to start."
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And Values" online Help topic or the "Add and Delete Information in the Registry" and "Edit Registry Data" online Help topics in Registry Editor.
NOTE: You should back up the registry before you edit it. - Run Registry Editor (Regedt32.exe)and locate the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ - From the Edit menu, click Add Key. Type the following and click OK:
Key Name: Parameters
Class : - Select the Parameters key.
- From the Edit menu, click Add Value. Type the following and click OK:
Value Name: Application
Data Type : REG_SZ
String :\
where\ is the drive and full path to the application executable including the extension (i.e., C:\WinNT\Notepad.exe) - Close Registry Editor.
- From the Services applet in Control Panel
- From a MS-DOS command prompt, type the following:
NET START
- Use the Sc.exe utility from the Resource Kit. Type the following from a MS-DOS command prompt:
where
For more information on installing and removing a user-defined service,please see the Srvany.wri document provided with the Windows NT ResourceKit utilities (i.e., C:\Reskit\Srvany.wri). This document can also be foundon the Windows NT Resource Kit CD in the Common\Config directory.
APPLIES TO
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional Edition
- Microsoft Windows NT Workstation 3.51
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Windows NT Server 3.51
- Microsoft Windows NT Server 4.0 Standard Edition
_______________________________________________________
若要进行 Windows NT 用户定义的服务执行以下步骤:
- 在 MS-DOS 命令提示符处 (运行 CMD.EXE),键入以下命令:
path\INSTSRV.EXE My Service path \SRVANY.EXE
path 所在的驱动器和目录的 Windows NT 资源工具包 (即,C:\RESKIT) 和 My Service 是您正在创建的服务的名称。
示例:是 Files\Resource Kit\Instsrv.exe 记事本是 Files\Resource Kit\Srvany.exe注:若要验证该服务已正确创建,检查注册表,以验证下的 ImagePath 值 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ service name设置为指向 SRVANY.EXE。 如果这未正确设置,服务将停止不久之后它将启动并返回一个事件 ID 7000 service name 启动失败。
警告:注册表编辑器使用不当会导致严重的问题,可能会要求您重新安装操作系统。Microsoft 不能保证可以解决导致错误地使用注册表编辑器的问题。使用注册表编辑器需要您自担风险。
有关如何编辑注册表的信息查看联机的"添加和删除注册表中的信息"和"编辑注册表数据"的帮助主题或"改变项和值"联机帮助主题在注册表编辑器中。
注: 您应该备份注册表之前对其进行编辑。 - 运行注册表编辑器 (Regedt32.exe)and 找到以下子项:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ < 我服务 > - 从编辑菜单中单击添加项。键入以下,然后单击确定:
键名称: 参数
类: < 将保留为空 > - 选择参数密钥。
- 从编辑菜单中单击添加值。键入以下,然后单击确定:
值名称: 应用程序
数据类型: REG_SZ
字符串:\
其中\ 是驱动器,包括该扩展名的应用程序可执行文件的完整路径 (即,C:\WinNT\Notepad.exe) - 关闭注册表编辑器。
-从在控制面板中的服务小程序
-从 MS-DOS 命令提示符处键入以下内容:
NET START < 我服务 >
-使用 Sc.exe 实用程序从资源工具包。键入从 MS-DOS 命令提示符下以下内容:
有关安装和删除用户定义的服务的详细信息,请参阅 Srvany.wri 文档提供与 Windows NT 资源工具包实用程序 (即,C:\Reskit\Srvany.wri)。此外可以在 Common\Config 目录中的 Windows NT 资源工具包光盘上找到此文档。
如何删除创建的用户
国际服务贸易是如何定义的?
请问如何创建Outlook的用户?
如何创建GUEST用户?
电脑如何创建用户
客户服务的定义?
服务的定义是什么
医疗服务的定义
创建用户的问题
创建用户的问题
如何创建本地用户 谢谢
如何在WinXP中禁止用户创建新的帐号??
请问 谁知道 如何在 别人的电脑 远程 创建用户
如何通过linux命令创建不同权限的用户
请问如何创建QQ群(未到16级的用户)
xp系统如何创建新的用户帐户
如何删除自己电脑里新创建的本地用户
文化服务贸易的定义
动感地带用户如何退订移动梦网里的包月服务
动感地带用户如何退订移动梦网里的包月服务
WINDOWS不同用户登陆如何调用不同的后台服务?
创建用户与本地用户的区别
今天我创建了一个系统的用户 我想知道如何换回原来那个用户!!!
一个电脑创建2个用户,如何让另一个用户看不到我的文件