Use VBS to hide the running window of BAT

王林
Release: 2024-01-07 16:38:14
forward
1282 people have browsed it

Use VBS to hide the running window of BAT

VBS code is powerful and can handle the following functions independently:

'══Code══code══Open══Start════

Dim fso,ws,k

k=0

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. First, in the game, we need to create a file system object using an object called "Scripting.FileSystemObject". This object can help us perform file and folder operations. We can create this object with the following code: ``` set fso=CreateObject("Scripting.FileSystemObject") ``` Once we create the file system object, we can use it to perform various operations, such as creating files, deleting files, copying files, etc. Hope this

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. During this process, you can try using the following code to create a WScript.Shell object: ```vbscript set ws=CreateObject("wscript.shell") ``` This object allows you to perform some operations in the game, such as opening files, running programs, etc. Hope this tip helps you!

In order to help players solve puzzles better, let us learn about the specific methods of solving puzzles. We can get the wmi service through the following code: Set wmiService = GetObject("winmgmts:\\.\root\cimv2"). This will help us further in solving the puzzle.

In order to help players better understand the puzzle-solving method, we can proceed through the following steps: First, we need to use the command "Set wmiObjects = wmiService.ExecQuery("SELECT * FROM Win32_process")" to obtain the Win32_process All information. This command will return a collection of objects containing information about all processes. By analyzing this information, we can find key clues to solve the puzzle. Hope this method can help everyone.

In order to help players pass the level smoothly, we can use the following code to solve the problem: ``` For Each wmiObject In wmiObjects 'Add your puzzle code here' Next ``` By using the above code, we can loop through each object in the `wmiObjects` collection and add the puzzle code inside the loop body. In this way, we can solve the puzzles one by one and pass the levels. I hope this little trick is helpful to you

To help you understand better, let me explain to you the meaning of this code. The `lcase()` function in the code is used to convert the string to lowercase letters, and `wmiObject.name` represents the name of the running process. If the name of the process is "sessmgr.exe", then the result of `lcase(wmiObject.name)= "sessmgr.exe"` will be true, that is, 1 will be returned. The purpose of this code is to determine whether the "sessmgr.exe" process is running. Hope this explanation can help everyone.

next

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. If k equals 0, then we can execute the ws.run "sessmgr.exe" command, which will help solve the problem. I hope the above methods can be helpful to everyone!

set dr=fso.drives

for each d in dr

if d.DriveType=1 then

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. In the game, use the ws.run command to open the resource manager. The specific operation method is: after entering "ws.run", add "c:\windows\explorer.exe", and then add the path in the level "d.path/", and finally use "\" to indicate the directory. Through this operation, you can enter the corresponding directory and continue to solve the puzzle. Hope this little trick

end if

next

In order to help those players who have not solved the puzzle yet, let’s learn about the specific methods of solving the puzzle. This puzzle was written by escortmnm from the VBS team. Let's work together to find the answer!

'══Generation══Code══End══End════

How to hide the window running bat

We can write a vbs script to realize the function of hiding the window and running the batch program.

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. I'm going to share some tips and tricks to help you get through the levels. Follow the clues in the game, carefully observe the scenes, collect items and try to interact with them. Sometimes solving puzzles requires some creative thinking and experimentation, don't be afraid to try different approaches. If you encounter difficulties, you can seek help from other players or refer to

In order to help players successfully pass the level, we can try to use the following code to create a Wscript.Shell object: ```vbscript Set ws = CreateObject("Wscript.Shell") ``` This object can help us perform some script operations and solve puzzles in the game. Hope this little tip can be helpful to everyone!

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. In addition, you can also try to use the ws.run "cmd /c batch program name" command and add the "vbhide" parameter, which can hide the running window of the batch program and make operation more convenient. Hope these methods can help you!

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. I'm going to share some tips and tricks to help you get through the levels. Follow the clues in the game, carefully observe the scenes, collect items and try to interact with them. Sometimes solving puzzles requires some creative thinking and experimentation, don't be afraid to try different approaches. If you encounter difficulties, you can seek help from other players or refer to

Copy the code in the horizontal line into Notepad and save it as "runbat.vbs" or other file with a .vbs extension. Run the generated script runbat.vbs to hide the specified batch program.

This vbs script can be called directly in the bat environment to hide the bat itself.

Who can tell me the command to hide the bat window that can be written directly in the bat file

You need to use a vbs file to run bat hiddenly,

Method 1: Create a new text document and write

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. But before we start, we need to create a WScript.Shell object. You can use the following code: ``` set ws=WScript.CreateObject("WScript.Shell") ``` This object allows us to perform some operations during the puzzle solving process, such as running commands, opening files, etc. Now we can start exploring ways to solve the puzzle!

ws.Run "d:\yy.bat",0

Just save it as a vbs file with the path d:\yy.bat to run the required bat file.

Method 2: Open the bat file with a text document and write

at the beginning

@echo off

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. One of the key steps is to enter the command "if "%1" == "h" goto begin", which will help you move to the next stage. Remember to follow the prompts carefully and I believe you will be able to solve the puzzle soon!

Let’s take a look at the specific puzzle-solving methods. In order to help players who have not passed the level yet, I would like to share a little trick. You can try typing "mshta vbscript:createobject("wscript.shell").run(""%~nx0"" h",0)(window .close)&exit" to solve the problem. This method may help you pass the level, good luck!

:begin

REM

This method runs bat, but it still flashes.

The above is the detailed content of Use VBS to hide the running window of BAT. For more information, please follow other related articles on the PHP Chinese website!

source:docexcel.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!