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-09 17:45
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Question about a BAT file. View 2,839 Replies 30
Original Poster Posted 2008-08-27 14:42 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
@echo off
start D:\Radmin2[1].2\Start Radmin Service

This is a BAT file I wrote.
But I put it in
(gpedit.msc) Group Policy --- Windows Settings --- Scripts (Startup/Shutdown) --- Startup.
I used Browse directly and pointed it to the BAT file.
But it just won't start.
I don't know whether there's a problem with the BAT, or a problem somewhere else.
Thanks in advance.
Floor 2 Posted 2008-08-27 14:59 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
When you open the bat file directly with the browser, antivirus software will report it, or block it directly. You can try turning off all protection software and then try again
Floor 3 Posted 2008-08-27 15:23 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
I turned it off, but I don't know what the reason is.
Just asking, could there be some other error?
Floor 4 Posted 2008-08-27 15:27 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
If you directly double-click and run this BAT, can it start that service?
Floor 5 Posted 2008-08-28 08:06 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
Yes.
Floor 6 Posted 2008-08-28 08:59 ·  中国 北京 联通
初级用户
Credits 49
Posts 43
Joined 2007-01-20 03:28
19-year member
UID 77088
Gender Male
Status Offline
It seems it only executes after logging in.
Floor 7 Posted 2008-08-28 09:10 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
How is that possible.
Floor 8 Posted 2008-08-28 09:18 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
Why use the browser to open it?
Floor 9 Posted 2008-08-28 09:38 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Write the startup status into a file and see
@echo off 
start D:\Radmin2.2\开始Radmin服务>C:\test.log


to huahua0919:
The OP added it as a startup script, he didn't say he was opening it with a browser.
Floor 10 Posted 2008-08-28 09:52 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
The friend in the post above, it seems yours won't work either.
Can I ask, what's the use of the >C:\test.log at the end?
Floor 11 Posted 2008-08-28 10:04 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
I misread it
1. Since it's a service, you should use the net start structure
2. Confirm the system permissions under which your service runs
3. You can use a simple command like @echo off&echo this is a test!&pause to test whether it succeeds. If it succeeds, that means there is a problem with your service at startup.
4. If it really doesn't work, put it in run and try
Floor 12 Posted 2008-08-28 10:04 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Either it can or it can't, what does "it seems it can't" mean?
>C:\test.log means outputting the execution result of the start command to the C:\test.log file. Post the contents of that file so we can take a look.
Floor 13 Posted 2008-08-28 10:14 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
That test.log file is empty.
Floor 14 Posted 2008-08-28 10:15 ·  中国 湖北 鄂州 电信
初级用户
Credits 32
Posts 15
Joined 2008-08-27 14:18
17-year member
UID 124285
Gender Male
Status Offline
And to the friend in post #11, mine isn't any kind of service, it's just a startup program, so it has nothing to do with permissions
Floor 15 Posted 2008-08-28 10:18 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
What about writing the startup script like this?
@echo off 
start D:\Radmin2.2\开始Radmin服务>C:\test.log 2>&1
Forum Jump: