中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-11 12:45
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Which services are standalone
Printable Version  1,543 / 15
Floor1 ooaf Posted 2009-02-24 19:32
中级用户 Posts 162 Credits 313
A question: which system services are standalone, with no dependencies? If you're replacing a system service program, it should be a standalone service.

[ Last edited by ooaf on 2009-2-26 at 10:15 ]
Floor2 yishanju Posted 2009-02-24 20:15
银牌会员 Posts 1,357 Credits 1,488
What you're looking for is RunAsSrv, right
Floor3 yishanju Posted 2009-02-24 20:16
银牌会员 Posts 1,357 Credits 1,488
Run As Service

- A tool for running any executable file (including batch files and scripts) as a system service

- Run Everything As a System Service

Run any executable file as a system service.
At first it was mainly for porting some Linux daemons; it can also be used to start any application and maintenance scripts.
Runs quietly; unless Interactive mode is specified, no window will pop up.
No login required; it runs automatically after system startup, without waiting for the user to finish logging in.
As an extra feature, it supports starting, stopping, and deleting any system service.
Fully takes over commands to the Service Control Manager (start, stop, etc.). After the program being run terminates, it automatically reports status to the Service Control Manager and then exits itself, without staying resident in memory.
pause / continue operations.
One runassrv service can concurrently run multiple applications specified by /cmdline, and the applications are initialized in the specified order.
runassrv.exe itself does not need to be placed in the system search path.
Added the control operation, which sends a control code to the specified service.
Added the listsrv operation, which lists all services and drivers, and supports many filtering conditions.
Added the -logfile and -loglevel options, logging support.
Added -unstoppable; the Service Control Manager will refuse to stop a service installed with this option.
Memory trimming strategy; in typical cases memory usage is less than 300KB.
 

http://baiy.cn/utils/runassrv/index.htm
Floor4 ooaf Posted 2009-02-24 21:44
中级用户 Posts 162 Credits 313
I already know about Run As Service.

What I want is a way to replace a system service program using only system commands!
When searching online about installing the radmin server side, I found a method for replacing the server side, but it didn't succeed in actual operation.

With the situation above, did something go wrong somewhere?
Floor5 ooaf Posted 2009-02-25 21:58
中级用户 Posts 162 Credits 313

Save it as w.bat, and when I run it, it appears as shown in the picture:

But if I copy it into CMD line by line, it runs normally. There must still be some problem somewhere, my eyes and brain are about to collapse!

Attachments
未命名.gif (65.29 KiB)
Floor6 ooaf Posted 2009-02-25 22:14
中级用户 Posts 162 Credits 313
Struggled through the collapse and solved it!
Floor7 HAT Posted 2009-02-25 22:16
版主 Posts 5,017 Credits 9,023
Can the copy command on the fourth line really execute? What system are you using?
Floor8 ooaf Posted 2009-02-25 22:18
中级用户 Posts 162 Credits 313
The Deepin stripped-down edition in vmware, no system protection, hehe
Floor9 ooaf Posted 2009-02-25 22:19
中级用户 Posts 162 Credits 313
If there were system protection, using raplace should work, right
Floor10 HAT Posted 2009-02-25 22:19
版主 Posts 5,017 Credits 9,023
It has nothing to do with system protection. copy doesn't support this kind of usage, does it?
Floor11 ooaf Posted 2009-02-25 22:24
中级用户 Posts 162 Credits 313
COPY?

[ Last edited by ooaf on 2009-2-25 at 22:25 ]

Attachments
未命名.gif (9.9 KiB)
Floor12 ooaf Posted 2009-02-25 22:26
中级用户 Posts 162 Credits 313
Boss Hatzi! Please give me some guidance!
Floor13 HAT Posted 2009-02-25 22:40
版主 Posts 5,017 Credits 9,023
Sorry, I remembered the copy command wrong.

When using the net command in a BAT file, what should follow is the service's Display Name, not the Service Name. The correct way is:

net stop + Display Name
or
sc stop + Service Name
Floor14 ooaf Posted 2009-02-25 22:52
中级用户 Posts 162 Credits 313
See the picture for explanation:

Attachments
未命名.gif (17.12 KiB)
Floor15 HAT Posted 2009-02-25 22:55
版主 Posts 5,017 Credits 9,023
At the command line, net can be followed by either the service name or the display name; in a BAT file, it's as post #13 said.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023