Hide bat execution. How to hide the cmd window when running a batch? How to hide a folder using Total Commander

The article describes various ways to hide the cmd window while executing a batch file.

Bat files, also known as batch files, can be very useful for running a whole package of commands. But I think many people are wondering how to make sure that the console window does not appear on the monitor. I will focus primarily on the built-in capabilities of the system; I will briefly mention third-party programs. Along the way, we will solve some other problems, for example, by adding a separate shortcut for the batch file.

How to bypass UAC protection? Refer to article

How to hide cmd window. Is it possible to do this using the body file itself?

No. The code runs in the console environment, which means the window will be displayed. You have to come to terms with this: the window will be open as long as the code is executed. All you can do is take some steps to ensure that the window appears for a minimum period of time. In principle, this is useful: we can observe the operation of the code with our own eyes. But if you want to hide the console window, you will have to use third-party tools to do this: other developers or the capabilities of Windows itself. Let's start with it.

Run the batch file quietly. Windows only.

In the “code madness” file itself, you sing the song yourself. I will suggest optimizing its content for maximum quiet operation. There is an important point here: the shorter the code itself, the more likely it is that the console window will appear for a short time. If the volume is large or several commands are written at once, the window may attract attention.

For example, I’ll take the script code, which allows a little (specifically, the characteristics processor V System properties ). This is done for the duration of the Windows session: after a reboot, everything will fall into place.

In general, we have the following batch file code:

REGEDIT4 ; @ECHO OFF ; CLS ; REGEDIT.EXE /S "%~f0" ; EXIT "ProcessorNameString"="Intel(R) Core(TM) i112-3470 CPU @ 800.5GHz"

Pay attention to the processor specifications. He will be responsible for changing system information. We name the file spec .bat . Also note that I will use only Latin characters in file names and avoid Cyrillic in the paths to their location, so that the path to the script is read by the system correctly. That’s why I’ll put the created bat file in the system directory - directly in the C: drive.

However, its launch is accompanied by:

  • console window appears cmd
  • the appearance of a UAC confirmation window with the changes being made (the task, as you can see, has become more complicated in itself, because system information is changing)

before executing the batch file, a UAC window appears

I suggest you get rid of the first window using the following script, already formatted into another vbs file. And here is the script for it (see my path to the file C:\spec.bat):

"HideBat.vbs CreateObject("Wscript.Shell").Run "C:\spec.bat", 0, True

I will call it by any name with the extension .vbs. Now the work of the batch file by clicking on the vbs nickname is accompanied only by the appearance of a window Account Control: the fact is that the changes made by the batch file affect the registry, and the system logically does not let this pass uncontrollably. How is the topic of a separate article:

However, we will digress a little from the topic of the article and finish what we started by creating a console hide for the file ( vbs file) special label. In the Object location field, specify the path in the format:

Wscript path-to-vbs-nick path-to-bat-nick

The label is ready (you can change its design via Shortcut properties). You can drop it into your Startup folder, place it in Windows Scheduler, or launch it by double-clicking it. There will be no console window.

How to hide cmd window? Special programs.

There are many of them, they are lightweight and easy to use. The downside is that they need to be downloaded and some installed. I will give the most popular of them:

  • Hidden Start (HStart)

Utility from a domestic manufacturer. I need to buy it, I don’t know the cost. However, with its help you can hide the window once and for all, and it doesn’t matter whether UAC confirmation is required or not - you can hide it too:

For 32 and 64 bit versions. It does not require installation, it is supplied as an executable file, which, when launched (as an administrator), is immediately sent to the Windows root directory. We agree, and she is now with us:

The utility can do a lot of things, including changing the sound level, opening drive trays, etc. For our case, to hide the cmd window, we could simply enter a command like:

Nircmd elevatecmd exec hide filepath

We didn’t get rid of the UAC window (elevatecmd exec is part of the command asking for UAC), but we weren’t promised that. And it’s inconvenient to constantly write the full path to the file in the console, so let’s immediately create a shortcut:

Nircmd cmdshortcut "~$folder.desktop$" "Batch file" elevatecmd exec hide file-path

How to hide the cmd window: batch turned into exe.

Also an option. This is already the music of the higher spheres. To those who are unfamiliar with this utility, check it out - it will come in handy: Bat To Exe Converter. As you can tell by the name, it turns a batch file into an executable file with the .exe extension. Download, install, use:

Good luck.

Read: 1,109

There are times when it is necessary to change a file attribute. Everyone can do this through the conductor. But a situation may arise in which it is necessary to remove the attribute on the command line. It seems like a small thing, but you need to know the commands. So today I decided to write this little instruction and show you how to remove the “Hidden” attribute on the command line.

If you have personal files stored on your computer that you would like to hide from prying eyes for one reason or another, I can recommend using the AxCrypt program, which we talked about in the article

How to remove the “Hidden” attribute from a folder or file?

As an administrator, open a command prompt. This is done like this:

Press the Win+R keys on your keyboard - this key combination will open the “Run” menu dialog box. In the window that appears, enter the command cmd or cmd.exe and click on OK.


Now we need to go to the folder in which we need to remove the “Hidden” attribute. To do this, enter the command in the command line:

cd /d “path to folder or file”

After the letter d there is a space and the path to your folder or file. In my case it looks like this:

cd /D h:\

That is With this command I will transfer from the “system32” folder, located on the “C” drive in the “Windows” directory, to the root directory of my flash drive, which in my case is called “H”


Now that we are in the directory we need, enter the following command:

attrib -S -H /S /D
How to remove the hidden attribute

This command removes the “Hidden” and “System” attributes from all files and folders in this directory.

Hello friends! Do you know how to hide a folder so that no one except you can get to it? Do not know? So, now in this short article I will describe to you in detail how you can hide your personal folders and protect them from unnecessary attention.

As you know, by default any folder is created in its normal form, and it can be made hidden only later, asking her certain attributes. Over the course of the article, I will look at how this can be done using several methods:

  • Using file properties;
  • Via Total Commander;
  • Using the command line;

First, I recommend creating a new folder and trying to hide it, in order to understand how it works, and only then proceed to the folder with your files. Well, come on, I’ll finally show you how to hide a folder in Windows 7 and other operating systems.

Hiding a folder using file properties

Hiding a folder using its properties is the simplest method that exists in Windows operating systems, although after seeing it, you will now see for yourself.

By right-clicking on the folder, select “ Properties».

The folder options will open, where, going a little lower to the attributes section, check the box next to the “ Hidden" and don't forget to press the save buttons first " Apply».

If you have any files stored in the hidden folder that you also want to hide, then when the “ Attribute Change Confirmations"You should check the box " To this folder and to all attached files" If, on the contrary, you need to hide only the folder and leave the files unchanged, then mark the first option and click “ OK" After this, the folder will receive the hidden attribute, and all attached files will remain unchanged.

How to hide a folder using Total Commander

In the second method, we will turn to the downloaded Total Commander program for help, thanks to which we can also hide any folder by setting the corresponding attribute to it.

Surely many of you already use this file manager, so I won’t explain much about its installation. The rest, who are hearing about it for the first time, should download it and install it on their personal computer.

So, we launch Total Commander and use navigation to go to the folder we need.

Now, having selected the folder with the right button, go to the menu where we click “ Files» – «».

A settings window will appear where we will be offered four types of attributes to choose from “ Archived, read-only, hidden and system" Since you and I have the same goal to hide the folder, we tick the “ Hidden", and confirm our choice by clicking on " OK" That's all, as you can see, nothing complicated.

Now I want to say a few words about the attribute " System" This attribute can also be classified as hidden. In general, look what happens if you mark hidden and system attributes together.

If you only select " Hidden", then the user will be able to see all folders by turning on simple display of files, but if you additionally check the box " systemic", then in this case, when simply displaying hidden files, it will not be visible.

Just in order to see system files in the folder view properties, you should uncheck the “ Hide system files and folders" Few ordinary users know about this, so this attribute can be regarded as an additional type of security.

Hiding a folder via the command line

I would probably consider this option to be the most difficult, because here you will have to execute commands in CMD, which many users really don’t like. But, I will consider it, since it is also performed using Windows’ own utility, which is installed with the system.

Well, let's get started, as usual when working with CMD we call " Execute» having already pressed a familiar key combination Windows + R. A window will open in which you can enter three letters “ CMD» click « Enter».

A command line will appear in which, in order to hide the folder, we will need to specify the attribute " h", which is responsible for performing this action.

So, in order to hide the folder, run this command: attrib +h “C:\Folder”


I’ll explain the command a little so you understand what’s what:

  • attrib— execution command to change the attribute;
  • +h – an attribute that will give a hidden appearance to our folder;
  • “C:\Folder” – the location where the hidden folder is stored ( you must specify your path to the folder);

By executing this command, the folder will become accessible only with the settings for showing hidden files enabled.

Through the command line, as through Total Commander, you can also specify a system attribute (which was described just above) adding +s:

attrib +h +s “C:\Folder”

By the way, after setting the system attribute, it will no longer be possible to remove the hidden view from the folder using the file properties, as the attribute will simply not be available.

For those who have finally changed their mind about hiding their files, now I will show you how you can get it all back. In principle, you don’t need to do anything complicated, just change a few characters in the command and that’s it, our folder will look the same as if nothing was done to it.

attrib -h -s “C:\Folder”

Making a folder invisible by changing the appearance of the icon

For those who don’t want to bother with all these attributes, I have another simple and interesting piece of advice. Its simplicity is that we can hide our folder without hiding it completely, but by setting only a transparent icon and an invisible name. Do you know how this can be done? No? Then, let me show it to you.

So, having called the folder properties, go to the “ Settings" and click on the button " Change icon».

In the abundance of icons that appears, select any empty space and click “ Ok».

As a result, you should see something similar in front of you.

So, now all we have to do is hide the name; to do this, select the folder and click “ F2" to rename the file. Now, holding down " ALT", hold it and write a set of numbers like this: 255 , then release all the keys and press “ Enter" As a result, there will be nothing on the screen except a dotted line around the hidden folder.

As always, in conclusion, I advise you to try all the options and choose the one that suits you. I don’t tie you to any one, since they are all working and not very complicated.

These recommendations will help you hide your personal information from ordinary users who are not particularly versed in all the intricacies of working with a computer. So, more experienced users probably know about these ways to hide a folder, and will probably be able to find them. Therefore, if you really need to hide something, you hide the folder, but store it a little deeper, on drive D for example, and not on the desktop.

Three simple and convenient ways to hide a folder in Windows

Sometimes there is a need to run bat file in invisible mode, hide, hide bat window. For example, if the file is executed through the scheduler. Or maybe a lot of commands are written there and take a long time to execute, while it flashes before your eyes. Examples of what you need hide bat window There can be many files. So if you are interested in how hide cmd window or how to run a program secretly, read carefully.

I suggest you familiarize yourself with the offers of my partners

1. Using the vbs script. With this script you can secretly launch programs, bat files, other files.

Dim oShell Set oShell = WScript.CreateObject ("WSCript.shell") oShell.run "application path\application name", 0 Set oShell = Nothing

For those who don’t know, just copy the text into notepad, put your path to the application and the name of the application, save it under any name - but with the vbs extension (for example - hide the start.vbs window)

Example: secretly launch the batch file qwerty.bat from drive C

Dim oShell Set oShell = WScript.CreateObject ("WSCript.shell") oShell.run "C:\qwerty.bat", 0 Set oShell = Nothing

Similar code

Set WshShell = CreateObject("WScript.Shell") RetCode = WshShell.Run("C:\qwerty.bat", 0, False)

You can run not only *.bat but also other files in hidden mode. For example, you want to run mp3 without a player window, provided you use Windows Media Player

Set WshShell = CreateObject("WScript.Shell") RetCode = WshShell.Run("C:\qwerty.mp3", 0, False)

If your mp3 is linked to another player, then add wmplayer.exe to the code

Set WshShell = CreateObject("WScript.Shell") RetCode = WshShell.Run("wmplayer.exe C:\qwerty.mp3", 0, False)

2. cmdow utility (place the utility itself in C:\windows\system32)