您当前的位置: 首页 > 

unity工具人

暂无认证

  • 4浏览

    0关注

    205博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

静默执行bat文件

unity工具人 发布时间:2021-02-24 21:29:47 ,浏览量:4

让bat隐藏运行需要用vbs文件才能实现,

方式一(使用vbs文件):

新建一个 文本文档后缀改为“vbs” , 可以这样写↓

set ws=WScript.CreateObject("WScript.Shell")
ws.Run "d:\yy.bat",0

↑其中d:\yy.bat是你需要运行的 bat文件 的路径。

也可以这样写↓

Set shell = Wscript.createobject("wscript.shell")
a = shell.run ("send_sl_scroll.bat",0)

↑"send_sl_scroll":需要执行的bat文件名

方法二:用 文本文档 打开 bat文件

在bat文件开头处写入

@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
REM

这个方法运行bat,还是闪了一下。

参考地址:https://www.baidu.com/

关注
打赏
1656671177
查看更多评论
立即登录/注册

微信扫码登录

0.0709s