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

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

问题描述

我已经搜查这一点,一些网页来这是不是真的有用还是太复杂(我不是一个熟练的批处理文件的程序员!)!我需要的是运行在隐蔽的形式一个批处理文件(无控制台窗口)。该批处理文件将无法从外部应用程序或code调用。它将由客户端点击,然后我想没有控制台页面中显示(只有被调用命令调用的页面应该显示)!批处理文件是完全如下:

 关闭@echo
调用SETUP.EXE
是否存在C:/ caillog转到跟踪
IF NOT存在C:/ caillog转到结束
:跟踪
调用dotnet4.exe
调用ClientService.msi
转到结束:结束


解决方案

我用VB脚本打开它隐藏,像这样的:

 设置objShell = WScript.CreateObject(WScript.Shell)
objShell.Run(%批处理文件%),0,真

对于例如bat文件我要运行是的run.bat 然后我会做这样的

  objShell.Run(run.bat中),0,真

而不是运行该批处理文件运行VB的文件。

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

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

解决方案

I use VBScripts to open it hidden, like this:

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

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

Instead of running the batch file run the vb file.

Write it in notepad and save it as *.vbs

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

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