中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-09-23 14:13
47,812 主题排行 / 349,917 发帖 / 今日 0 篇 / 48,273 会员排行
DOS批处理 & 脚本技术(批处理室) » 如何让批处理在后台运行而不弹出窗口,开机脚本除外
可打印版本  6,809 / 20
第1楼 yaoview 发表于 2008-07-09 14:27
初级用户 发帖 6 积分 21
如何让批处理在后台运行而不弹出窗口,开机脚本除外
编了一个批处理,想在后台运行而不弹出窗口,利用开机脚本可以,但CPU占用太高,请问有没有什么命令可以不弹出窗口?谢谢!
第2楼 wjdidi 发表于 2008-07-09 15:02
初级用户 发帖 55 积分 175
下面这是以前收藏的论坛里的某位高手[具体不太记得了]的代码。。可以隐藏窗口

@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~fs0 h",0)(window.close)&&exit
:begin
rem 下边开始写批处代码了
第3楼 HAT 发表于 2008-07-09 15:14
版主 发帖 5,017 积分 9,023
批处理隐藏运行的10种思路
http://www.cn-dos.net/forum/viewthread.php?tid=23846
第4楼 z2364003 发表于 2008-08-09 15:59
新手上路 发帖 6 积分 12
学习了
第5楼 z2364003 发表于 2008-08-09 16:01
新手上路 发帖 6 积分 12
批处理中的set后面跟的参数干什么用的,,
第6楼 z2364003 发表于 2008-08-09 16:02
新手上路 发帖 6 积分 12
那里有甚而的批处理语名
第7楼 lxmxn 发表于 2008-08-09 19:56
版主 发帖 4,938 积分 11,386
Originally posted by z2364003 at 2008-8-9 16:02:
那里有甚而的批处理语名

现在很流行火星文?
第8楼 wafzaa 发表于 2008-08-16 20:49
新手上路 发帖 5 积分 12
···············顶啊···好帖子
第9楼 HAT 发表于 2008-08-16 21:36
版主 发帖 5,017 积分 9,023
Re 5楼
自己先看看帮助
set /?
Two new switches have been added to the SET command:

SET /A expression
SET /P variable=

The /A switch specifies that the string to the right of the equal sign
is a numerical expression that is evaluated. The expression evaluator
is pretty simple and supports the following operations, in decreasing
order of precedence:

() - grouping
! ~ - - unary operators
* / % - arithmetic operators
+ - - arithmetic operators
<< >> - logical shift
& - bitwise and
^ - bitwise exclusive or
| - bitwise or
= *= /= %= += -= - assignment
&= ^= |= <<= >>=
, - expression separator

The /P switch allows you to set the value of a variable to a line of input
entered by the user. Displays the specified promptString before reading
the line of input. The promptString can be empty.
第10楼 tkmark 发表于 2009-04-08 15:27
新手上路 发帖 3 积分 1 来自 shanxi
不知道HAT版主的意思..
/P命令不是由用户输入参数的么?
你的意思是用符号可以实现隐藏运行的窗口?
不明白..我比较菜
第11楼 ligui0001 发表于 2009-04-09 04:18
初级用户 发帖 41 积分 58
说明点
第12楼 hgj9999 发表于 2009-04-09 05:07
新手上路 发帖 2 积分 2
真的可以实现吗?我学习一下
第13楼 prospy 发表于 2009-04-17 23:40
新手上路 发帖 2 积分 2
有点难搞懂
第14楼 welky 发表于 2009-04-24 10:53
新手上路 发帖 3 积分 3
来学习的!
第15楼 1405 发表于 2009-04-26 01:52
新手上路 发帖 8 积分 5
我也想看一下
1 2  下一页
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023