China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-27 01:53
中国DOS联盟论坛 » 其它操作系统综合讨论区 » How to stop a service in a batch file? View 3,516 Replies 15
Original Poster Posted 2008-10-26 17:27 ·  中国 黑龙江 佳木斯 联通
新手上路
Credits 1
Posts 1
Joined 2008-10-26 16:58
17-year member
UID 129169
Gender Male
Status Offline
Remember there was a command, but I can't remember it. Who remembers?
Floor 2 Posted 2008-10-26 17:36 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 3 Posted 2008-10-26 18:02 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 4 Posted 2008-10-26 23:24 ·  中国 广东 东莞 电信
初级用户
Credits 86
Posts 45
Joined 2007-07-27 08:05
19-year member
UID 94111
Gender Male
Status Offline
net stop is better than sc stop, more stable and less error - prone
Floor 5 Posted 2008-10-26 23:40 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
How to view the help for net.exe?

C:\>NET /?
An error occurred while opening the help file.

Please type NET HELPMSG 3710 for more help.


C:\>NET HELPMSG 3710

An error occurred while opening the help file.
Floor 6 Posted 2008-10-27 08:57 ·  中国 浙江 嘉兴 海宁市 电信
中级用户
★★
Credits 360
Posts 216
Joined 2007-05-29 17:41
19-year member
UID 89677
Gender Male
Status Offline
net /?

Everything is fine here.

Is there a problem with your CMD?
Floor 7 Posted 2008-10-27 09:37 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
I haven't heard of it. Can you give an example to illustrate it?
Floor 8 Posted 2008-10-27 09:54 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Originally posted by tireless at 2008-10-26 23:40:
How to view the help for net.exe?


Quote:
C:\>NET /?
An error occurred while opening the help file.

Please type NET HELPMSG 3710 for more help.


C:\>NET HELPMSG 3710

An error occurred while opening the help file.





Is your system a streamlined XP?

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 9 Posted 2008-10-27 09:56 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
View the services started in the system:

C:\Documents and Settings\haige>net start
The following Windows services have been started:

Application Layer Gateway Service
Background Intelligent Transfer Service
ColdFusion MX 7 Search Server
COM+ Event System
Computer Browser
Cryptographic Services
DCOM Server Process Launcher
DHCP Client

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 10 Posted 2008-10-27 09:57 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Stop the system service:

C:\Documents and Settings\haige>net stop Themes

Themes service has been stopped successfully.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 11 Posted 2008-10-27 10:03 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
net stop can only stop the service and does not change the startup type of the service. The default startup type of Themes is Automatic. If you use NET STOP to stop the Themes service, the Themes service will still run again after restarting.
Attachments
未命名.JPG

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 12 Posted 2008-10-27 10:07 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
The sc command is a bit better. It can start services and also change the startup type of services. NET START and NET STOP are just for simply starting and stopping services.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 13 Posted 2008-10-27 10:09 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Originally posted by yishanju at 2008-10-27 09:54 AM:


Is your system a streamlined XP?

Yes. Which file is missing?
Floor 14 Posted 2008-10-27 10:24 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
The so-called streamlining, of course, is that a lot of infrequently used files are removed, and help files and such are all streamlined away, right

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 15 Posted 2008-10-27 12:23 ·  中国 上海 杨浦区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
I always use sc. Of course, there is a sequence for service loading. The following two services are related to each other, so you need to wait for the OracleDBConsoleorcl service above to be loaded completely before the OracleCSService below can start normally.

%systemroot%\system32\sc.exe config OracleDBConsoleorcl start= DEMAND
%systemroot%\system32\sc.exe start OracleDBConsoleorcl
rem It takes 90 seconds to start the OracleDBConsoleorcl service for 3800+
rem %systemroot%\system32\ping.exe -n 90 127.0.0.1>nul
%systemroot%\system32\sc.exe config OracleCSService start= DEMAND
%systemroot%\system32\sc.exe start OracleCSService
Forum Jump: