隐藏简单的批处理窗口 [英] Hiding a simple batch window

查看:26
本文介绍了隐藏简单的批处理窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了这个,有些页面并不是很有用或太复杂(我不是一个熟练的批处理文件程序员!)!我需要的是以隐藏形式(无控制台窗口)运行批处理文件.不会从外部应用程序或代码调用批处理文件.它将被客户端单击,然后我不希望显示任何控制台页面(仅应显示由 call 命令调用的页面)!批处理文件如下:

I've searched this and some pages came which weren't really useful or were too complicated (I am not a skilled batch file programmer!)! What I need is to run a batch file in hidden form (no console window). The batch file will not be called from external application or code. It will be clicked on by the client and then I want no console pages to be shown (only pages which are called by call command should be shown)! The batch file is exactly as follows:

@echo off
call setup.exe
IF EXIST "C:/caillog" goto tracking 
IF NOT EXIST "C:/caillog" goto end


:tracking
call dotnet4.exe
call ClientService.msi
goto end

:end

推荐答案

我用VBScripts把它打开隐藏起来,像这样:

I use VBScripts to open it hidden, like this:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("%batchfile%"), 0, True

例如我想运行的 bat 文件是 run.bat 那么我会这样做

for e.g the bat file I want to run is run.bat then I'll do like this

objShell.Run("run.bat"), 0, True

运行 vb 文件而不是运行批处理文件.

Instead of running the batch file run the vb file.

写在记事本中并保存为*.vbs

Write it in notepad and save it as *.vbs

这篇关于隐藏简单的批处理窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆