![]() |
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-09 16:41 |
47,811 topics / 349,896 posts / today 1 new / 48,254 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] Question about a BAT file. |
| Printable Version 2,831 / 30 |
| Floor1 zeffortj | Posted 2008-08-27 14:42 |
| 初级用户 Posts 15 Credits 32 | |
|
@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. |
|
| Floor2 huahua0919 | Posted 2008-08-27 14:59 |
| 银牌会员 Posts 780 Credits 1,608 | |
|
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
|
|
| Floor3 zeffortj | Posted 2008-08-27 15:23 |
| 初级用户 Posts 15 Credits 32 | |
|
I turned it off, but I don't know what the reason is.
Just asking, could there be some other error? |
|
| Floor4 HAT | Posted 2008-08-27 15:27 |
| 版主 Posts 5,017 Credits 9,023 | |
|
If you directly double-click and run this BAT, can it start that service?
|
|
| Floor5 zeffortj | Posted 2008-08-28 08:06 |
| 初级用户 Posts 15 Credits 32 | |
|
Yes.
|
|
| Floor6 tongzj | Posted 2008-08-28 08:59 |
| 初级用户 Posts 43 Credits 49 | |
|
It seems it only executes after logging in.
|
|
| Floor7 zeffortj | Posted 2008-08-28 09:10 |
| 初级用户 Posts 15 Credits 32 | |
|
How is that possible.
|
|
| Floor8 huahua0919 | Posted 2008-08-28 09:18 |
| 银牌会员 Posts 780 Credits 1,608 | |
|
Why use the browser to open it?
|
|
| Floor9 HAT | Posted 2008-08-28 09:38 |
| 版主 Posts 5,017 Credits 9,023 | |
|
Write the startup status into a file and see
to huahua0919: The OP added it as a startup script, he didn't say he was opening it with a browser. |
|
| Floor10 zeffortj | Posted 2008-08-28 09:52 |
| 初级用户 Posts 15 Credits 32 | |
|
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? |
|
| Floor11 huahua0919 | Posted 2008-08-28 10:04 |
| 银牌会员 Posts 780 Credits 1,608 | |
|
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 |
|
| Floor12 HAT | Posted 2008-08-28 10:04 |
| 版主 Posts 5,017 Credits 9,023 | |
|
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. |
|
| Floor13 zeffortj | Posted 2008-08-28 10:14 |
| 初级用户 Posts 15 Credits 32 | |
|
That test.log file is empty.
|
|
| Floor14 zeffortj | Posted 2008-08-28 10:15 |
| 初级用户 Posts 15 Credits 32 | |
|
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
|
|
| Floor15 HAT | Posted 2008-08-28 10:18 |
| 版主 Posts 5,017 Credits 9,023 | |
|
What about writing the startup script like this?
|
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |