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-10 16:56
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Hide the window when running a BAT View 2,639 Replies 13
Original Poster Posted 2007-12-30 20:13 ·  中国 北京 鹏博士BGP
中级用户
★★
Credits 322
Posts 144
Joined 2007-01-10 13:00
19-year member
UID 76062
Gender Male
Status Offline
Haven't been on the forum for a long time
`

I really miss everyone


Posting some code for hiding the window when running a BAT`


@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
REN the code to run` Hehe
Floor 2 Posted 2007-12-30 20:34 ·  中国 江苏 无锡 宜兴市 电信
中级用户
★★
Credits 487
Posts 212
Joined 2007-04-01 08:22
19-year member
UID 83597
Gender Male
Status Offline
Uh.... thanks, OP, but there is already a dedicated thread for this...
Floor 3 Posted 2008-01-16 00:26 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
10 approaches to running batch files hidden
http://www.cn-dos.net/forum/viewthread.php?tid=23846
Floor 4 Posted 2008-01-16 08:46 ·  中国 山东 烟台 联通
中级用户
★★
Credits 257
Posts 123
Joined 2008-01-05 11:08
18-year member
UID 107722
Gender Male
From 烟台
Status Offline
Bookmarked
路 是自己选的
学习 是为了具备解决问题的能力
Floor 5 Posted 2008-01-18 07:48 ·  中国 上海 嘉定区 电信
初级用户
Credits 22
Posts 11
Joined 2007-08-26 03:57
18-year member
UID 95858
Gender Male
Status Offline
I'm learning too
Floor 6 Posted 2008-01-18 17:21 ·  IANA 局域网IP(Private-Use)
初级用户
Credits 70
Posts 30
Joined 2008-01-17 14:22
18-year member
UID 108844
Gender Male
Status Offline
Useful stuff
Floor 7 Posted 2008-04-10 19:28 ·  中国 福建 厦门 电信
新手上路
Credits 16
Posts 7
Joined 2008-03-23 17:20
18-year member
UID 113783
Gender Male
Status Offline
I want to see posts with more ideas, so I'll just bump this first.
Floor 8 Posted 2008-05-17 02:35 ·  中国 贵州 贵阳 电信
新手上路
Credits 10
Posts 5
Joined 2008-05-17 02:03
18-year member
UID 118901
Gender Male
From 海南三亚
Status Offline
OP's code doesn't work
That @echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
and start /min xx.bat will both still flash a window, and when the machine lags it's very easy to clearly see what's in the window
Floor 9 Posted 2008-05-17 03:34 ·  中国 广西 南宁 电信
中级用户
★★
丶杏灬丶
Credits 280
Posts 105
Joined 2008-05-06 03:37
18-year member
UID 117858
Gender Male
From 广西
Status Offline
Can it be hidden?
Floor 10 Posted 2008-11-13 12:35 ·  中国 浙江 杭州 电信
新手上路
Credits 10
Posts 9
Joined 2008-11-07 16:23
17-year member
UID 130295
Gender Male
Status Offline
Bookmarked
Floor 11 Posted 2008-11-13 18:13 ·  中国 河南 安阳 联通
新手上路
Credits 8
Posts 8
Joined 2008-11-13 16:45
17-year member
UID 130863
Gender Male
Status Offline
Seems like it doesn't work. It still flashes once when run. Because the machine is lagging?
Floor 12 Posted 2008-11-13 19:59 ·  中国 河南 开封 联通
新手上路
Credits 2
Posts 2
Joined 2008-11-13 18:46
17-year member
UID 130876
Gender Male
Status Offline
Not bad, it just flashes the window once
Floor 13 Posted 2008-11-14 10:45 ·  中国 四川 成都 电信
新手上路
Credits 8
Posts 8
Joined 2008-11-14 09:40
17-year member
UID 130913
Gender Male
Status Offline
Not bad, it does flash once
Floor 14 Posted 2008-11-26 09:59 ·  中国 江苏 南京 电信
新手上路
Credits 6
Posts 20
Joined 2008-11-25 16:08
17-year member
UID 132064
Gender Male
Status Offline
It still flashes. Is there any way that doesn't flash and also doesn't use vbs or the like?
Forum Jump: