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-09-29 00:16
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Question about a BAT file. View 3,332 Replies 30
Floor 16 Posted 2008-08-28 10:25 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
Friend in the post above, can you give an exact answer? I've already rebooted my machine N times.
Floor 17 Posted 2008-08-28 10:29 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
Since it's an application program, then put it in run
Or add a delay in your script before starting your program
Floor 18 Posted 2008-08-28 10:33 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
The reason I put it in the script is precisely because I don't want that program's display box to appear. I want it to execute at startup, or execute in the background.
Floor 19 Posted 2008-08-28 10:35 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
The key is whether your program supports interactive execution?
If it does, wouldn't writing a vbs be better
Floor 20 Posted 2008-08-28 10:36 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
I don't know how, hehe. I already said I'm a newbie.
Floor 21 Posted 2008-08-28 10:45 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Friend in post #16, I don't have the same test environment as you, so how can I give you an "exact answer"?
The start command in the startup script can't start that service; it may be because when the script is executed at startup, that service still hasn't finished starting. The code in post #15 is for testing that.
If you're worried about rebooting the machine, then don't test it. I'll wait with you for an expert's answer :)
Floor 22 Posted 2008-08-28 10:48 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
Hehe, friend, don't be angry, I'm a newbie too and don't understand anything. If I said something wrong, please don't mind it.
We're all learning from each other
Floor 23 Posted 2008-08-28 10:54 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
I just tried again by pointing to the file to be executed in RUN, and it still doesn't work.
Floor 24 Posted 2008-08-28 10:56 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
I really don't know whether there's something wrong with your computer
vbs

Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "D:\Radmin2.2\开始Radmin服务",0,true
Set oShell = Nothing
Floor 25 Posted 2008-08-28 11:01 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
Hehe, by the way, let me ask.
Is this file also put in the script?
Floor 26 Posted 2008-08-28 11:01 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
Or is the file format saved as *.VBS?
Floor 27 Posted 2008-08-28 11:02 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
vbs is also a script, the save format is .vbs
Floor 28 Posted 2008-08-28 11:15 ·  中国 湖北 鄂州 电信
初级用户
★
Credits 32
Posts 15
Joined 2008-08-27 14:18
18-year member
UID 124285
Gender Male
Status Offline
Many thanks to the friend in post #24. It seems like it works now. Haha
Floor 29 Posted 2008-08-28 11:19 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
Again with "it seems"—either it works or it doesn't
No need to thank me, thank the forum and Brother HAT
Floor 30 Posted 2008-08-28 11:32 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
The startup script should be saved under %windir%\system32\GroupPolicy\Machine\Scripts\Startup
Then in Group Policy you just need to specify that script's filename, for example radmin.cmd
This kind of trojan sometimes needs some services to support it, and it may not be able to start at boot, so it's best added to the user logon script
%windir%\system32\GroupPolicy\user\Scripts\Startup
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Forum Jump: