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-07-29 10:02
中国DOS联盟论坛 » 论坛回收站 » Request ideas for batch processing View 1,761 Replies 2
Original Poster Posted 2009-12-18 17:02 ·  中国 江苏 苏州 电信
初级用户
Credits 50
Posts 27
Joined 2008-11-08 15:33
17-year member
UID 130380
Gender Male
From 南京
Status Offline
Dear friends: How to realize the running of a certain program (such as automatic recording) in batch processing, and hide the window of this program? Hope the friends can give some guidance, preferably with some idea inspiration, thanks!

[ Last edited by konkoo on 2009-12-18 at 17:18 ]
怅然怡然,若失若得.
Floor 2 Posted 2009-12-18 19:03 ·  中国 北京 中电华通通信有限公司
高级用户
★★★
据说是李先生
Credits 609
Posts 400
Joined 2008-04-23 15:55
18-year member
UID 116706
Gender Male
Status Offline
If it is an executable program, such as .exe .bat .cmd .pif, etc., even .vbs .js .vbe can be run directly by entering their full file names (if there are spaces, enclose them in quotes), and the suffix can be omitted, but the priority is that .com is the highest, and then .exe and others;

For example
"C:\Program Files\Windows Media Player\wmplayer.exe"

or
"C:\Program Files\Windows Media Player\wmplayer"

can run Windows Media Player;

If it is a program in the system path, you can omit their path.

For example
sndrec32

can run the recorder applet.

You can also use the start command to start a program, which can initialize their startup status
For example
start /min "" wmplayer

can run in minimized mode.

Batch processing cannot hide the running of a program, and you need to use a vbscript script.
┏━━━━━━┓
┃据说是李先生┃
┠──────┨
┃*ntRSS┃
┗━━━━━━┛
Floor 3 Posted 2009-12-18 19:08 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
1. Simply using the system-provided cmd cannot be hidden.
2. It can be achieved by using third-party command-line tools that provide the hiding function.
3. Using vbs is also possible:
@echo off
echo strSoundFile = "C:\Windows\Media\Notify.wav">hanye.vbs
echo Set objShell = CreateObject("Wscript.Shell")>>hanye.vbs
echo strCommand = "sndrec32 /play /close " ^& chr(34) ^& strSoundFile ^& chr(34)>>hanye.vbs
echo objShell.Run strCommand, 0, True>>hanye.vbs
cscript //nologo hanye.vbs & del hanye.vbs

It uses the recorder to play an audio, and after modification, it also supports the recording function.
Forum Jump: