
rem 拖拽一个文件到bat文件图标上并让该bat隐藏运行
set #=Any questions&set _=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%_% 核戚%z%
if "%~1" equ "" (
echodrag and drop a file onto the batfile icon
pause&goto end
) else (
if /i "丛氏枝%~2" equ "hide" (goto begin)
)
start mshta vbscript:createobject("wscript.shell").run("渗敏""%~f0"" ""%~1"" hide",0)(window.close)&&exit
:begin
echofilepath="%~1"
echofiledirectory="%~dp1"
echofilename="%~nx1"
echodo something
:end
exit
把下面的代码加到批处理前面,就可以实现隐藏运拍键派行。\x0d\x0a@echo off\x0d\x0aif "%1" == "h" goto begin\x0d\x0amshta vbscript:createobject("wscript.shell").run("%~fs0 h",0)(window.close)&&exit\x0d\x0a:begin\x0d\x0arem 下边袭贺开始是批处代亮做码了。可以编辑一个vbs脚本,在其中以隐藏窗口运行批处理程序。------------------------------------------------------------
Set ws = CreateObject("Wscript.Shell")
ws.run "cmd /c 批处理程序名",vbhide
------------------------------------------------------------
将水平线中代码拷贝到记事本中,保存为"runbat.vbs"或者其它的名字(扩展名必须是.vbs),然后点击旅侍枯运行生成的脚本runbat.vbs,即可隐谈知藏运行指定的批处理程序。
这个vbs脚本也可以在bat环境中直接调用,达到隐藏拆洞bat自身目的
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)