четверг 06 февраля

Run Vbs File From Cmd Prompt

Skip to content

Run Vbs File From Cmd Prompt

by четверг 06 февраля

Most ordinary Windows users never use the Command Prompt and have no idea what sort of things you can do from the command line. More experienced users will know that running command line commands can be very useful for a range of tasks and grouping everything into a single batch file to process it all together can be very powerful.

One inconvenience with running batch files is that they always open a console window which shows the output of the commands being executed. This can be important if you want to interact or see what is happening while the batch file is running but a bit annoying if you want to run the batch script quietly in the background or while starting windows.

Launch the VB script and supply the batch file as an argument, then the code runs the script while not showing any output. It can be done with a single line of code. CreateObject(“Wscript.Shell”).Run “””” & WScript.Arguments(0) & “”””, 0, False. Create an empty text file, copy and paste the above line then save it as a.vbs file.

For short batch files, the console window may appear and disappear in a flash or stay open for longer if more commands are being executed. There is no standard built in way to completely hide the console window from showing so if you want to do that another solution is required. Here we show you some different ways to make your batch script run silently without a console window showing.

Note: When using a method to hide the console window make sure the batch script contains no commands that are likely to stop the script before it exits, such as pause or requiring user input like a Yes/No response. For example, if a script has been converted into an executable and requires interaction, you won’t be able to do anything and the process will stay in Task Manager until it’s manually killed.

Run a Silent Batch Script Using a Third Party Utility

A simple and common solution for running a batch file silently is launching it via a third party utility that suppresses the console window.

Hidden Start (HStart)

Hidden Start is a portable and quite powerful tool that can launch executables and scripts with several useful options. We are using version 4.2 from 2013 because it’s portable and not as restricted as newer versions. Since version 4.3, Hidden Start is no longer portable and also pops up a nag every time you try to run a hidden console, which makes it useless for this purpose.

Unzip and run the program with HStartUI.exe, the process consists of three steps. Manually add or drop your batch file onto the window, make sure “Hide console window” is checked and optionally check “Run with highest privileges” if your script requires it. Other setup options like priority or starting directory are not essential unless you know the script requires them.

Step 3 shows the output command that has to be manually run. You can use the buttons at the bottom to copy the command, automatically create a shortcut or add an autostart entry into the registry. Note the bypass UAC prompt option is not available in the free version (we show you how to do that for free later).

Download Hidden Start

SilentCMD

This is a small 14KB tool that is not blessed with tons of features but does the simple task which we are looking for. If you are on Windows 10, .NET Framework 3.5 will be offered for install when running the tool if it isn’t already on your system. The basic syntax to use in shortcuts or similar is quite simple.

SilentCMD [path to .bat file] [batch arguments] [options]

There are two additional options in SilentCMD. One is to enable logging with “/log:[path to .txt]” and the other is to start the script after a delay using “/DELAY:[xx seconds]”. Append the option to the end of the command. As long as you don’t need extra functions like elevation or a different starting directory, SilentCMD works nicely and might be all that you need.

Apr 11, 2016 - X-Force is Keygen which will generate activation key for Autocad 2014. Autocad 2014 software free download full version with crack 64 bit. Autodesk AutoCAD 2014 design and documentation software, of the world's leading 2D. Chinese Version Download. Select I have an activation code provided by Autodesk; Run XFORCE Keygen as an. Xforce keygen autocad 2014 64 bit free download. X force keygen for. Download autodesk autocad 2014 64 bits x64 pt br keygen x force. Xforce keygen 64 bits version for autocad 2014 free download.

Download SilentCMD

NirCMD

Nirsoft’s NirCMD is a small multi function tool that can quietly perform dozens of tasks without popping up any console window. These include ejecting ROM drives, changing audio volumes, enabling screensavers, controlling processes/services and much more. The following command can be used at boot or in a shortcut to run a batch file silently:

nircmd exec hide [path to .bat file]

The exec and hide commands are used to execute the script and hide any console windows from opening.

Include elevatecmd to request administrator privileges for the batch file although it’s only needed if you know commands in your script require elevation.

nircmd elevatecmd exec hide [path to .bat file]

A desktop shortcut can be created manually or you can tell NirCMD to create a shortcut from the command line with the included commands so the silent script is ready to run.

nircmd cmdshortcut “~$folder.desktop$” “SilentBatch” exec hide C:UsersRaymondccMyBatchFile.bat

The above will create a desktop shortcut called SilentBatch which will silently execute the MyBatchFile.bat script. Note that you may have to change the “Start in” location in the shortcut as output from the script that doesn’t supply a path will default to C:Windows.

On double clicking the NirCMD executable it will offer the option to copy itself to the Windows directory so you only have to use nircmd.exe and not supply a full path every time. It’s advisable to do that if you plan to make use of NirCMD on your computer (make sure to right click and run nircmd.exe as administrator).

For full information about the wealth of commands available, have a read of the full NirCMD Help file.

Download NirCMD

Raymond.cc Silent Batch Launcher

We also have a little tool that can launch a batch file silently. It’s created in Autoit and is essentially a slightly advanced version of the “Create Your Own Executable File” method on page two. Silent Batch Launcher is designed to be simple to use and provide a slightly different option to the other tools here.

Run the executable and you will be asked to browse for a batch file. An INI file containing the path to the script will then be created next to the executable. Every time you run Silent Batch Launcher from then on it will execute the same batch file as long as the INI file is present.

To run a different script, delete the INI file or hold Shift while launching the tool and it will popup the file requester. The INI file name will match the EXE file name so you can have differently named occurrences of the tool in the same folder. There are two files in the archive, use the “Admin” version if the script requires elevation. Any useful feedback you have about the tool is welcome.

Download Silent Batch Launcher

Note: Because this tool was created with Autoit, it does create some false positives with online virus scanners like VirusTotal.

There are a few other tools that can hide the console window of a batch script that we haven’t mentioned here. They include Cmdow, Create Hidden Process, Hidecon, and Hideexec.

Hide the Batch Console With a Visual Basic Script

Hiding the batch script console window using Visual Basic is quite similar to using an external command and works in basically the same way. Launch the VB script and supply the batch file as an argument, then the code runs the script while not showing any output. It can be done with a single line of code.

CreateObject(“Wscript.Shell”).Run “””” & WScript.Arguments(0) & “”””, 0, False

Create an empty text file, copy and paste the above line then save it as a .vbs file. Alternatively, download launchquiet.vbs which is a ready made script. To add it to a shortcut or a startup location etc, use the commands in the following way. Don’t forget to use quotes if your paths or filenames contain spaces.

Wscript [path to .vbs file] [path to .bat file]

If you would like to supply an argument for the batch file, the piece of VB script has to be altered slightly by changing the two sets of four double quotes to two sets of two.

CreateObject(“Wscript.Shell”).Run “” & WScript.Arguments(0) & “”, 0, False

Then supply the arguments along with the batch script path inside quotes:

Wscript [path to .vbs file] “[path to .bat file] [argument]”

Again, for convenience, you can download a ready madelaunchquiet_args.vbs script file.

On the next page, we’ll look at how to convert a batch script into an executable file, how to create a batch executable without any additional software and how to run a script from a scheduled task.

12Next › View All

You might also like:

7 Ways to Measure Time Taken to Complete a Batch File or Command Line Execution6 Ways To Batch Create Multiple Folders at Once5 Ways to Trigger UAC Elevation from Command Line7 Ways To Remove Duplicate Lines in Text Files2 Ways to Convert REG to EXE, BAT, VBS and AU3 to Bypass Registry Editing Restriction

Alex10 months ago

Here is another implementation: stackoverflow.com/a/56111754/70405

Reply

Thank you for nice article, after a research found nircmd is the easiest and best utility

Reply
Kiran Vadday12 months ago

Hi Jeremy,

Can I add the lines provided by you directly in my batch file after @echo off?

Thank you,
Kiran.

Reply

Another option: create a Windows shortcut and use this as the path:

cmd.exe /c echo CreateObject(“Wscript.Shell”).Run “notepad.exe”, 0, false > run_hidden.vbs & start /wait wscript run_hidden.vbs & del run_hidden.vbs

Reply
Nagesh1 year ago

Thank you This helped me a lot.

Reply

“Run whether user is logged on or not will not work no matter what you do”
True!

Reply
HAL9000 Author1 year ago

You need to use that or it won’t hide the console window, if you use “run only when user is logged in”, a console window will appear, which is what we a trying to avoid.

Reply

Thank you so much!!

Reply
Squashman1 year ago

You missed a tool that has been around for 16 years.
joeware.net/freetools/tools/quiet/index.htm

Reply

The article is not about listing every single tool around that can hide a console window.

Reply
Me2 years ago

Thanks a lot for “Run A Silent Batch Script Using A Scheduled Task”.
It saved me a 2 minutes popup every 10 minutes :)

Reply

Run whether user is logged on or not will not work no matter what you do

Reply

Leave a Reply

.vbs Extension - List of programs that can open .vbs files

In the following table, you can find a list of programs that can open files with .vbs extension.This list is created by collecting extension information reported by users through the 'send report' option of FileTypesMan utility.
The product name, description, and company name are taken from the version information of the .exe file.The 'Actions' list is taken from the context menu items added to Explorer by the specified program.The 'Popularity' column displays one of the following 4 values: Low, Medium, High, and Very High, which is determined according to the number of users that sent the specified record.

EXE NameProduct NameDescriptionCompanyActionsPopularity
cmd.exeWindows Command ProcessorMicrosoft CorporationRun as Administrator with Command PromptLow
CScript.exeMicrosoft R Windows Script HostMicrosoft R Console Based Script HostMicrosoft CorporationOpen with Command PromptMedium
CScript.exeMicrosoft (r) Windows Script HostMicrosoft (r) Console Based Script HostMicrosoft CorporationOpen, Open with Command PromptVery High
CScript.exeMicrosoft Windows Scripting HostConsole Based Scripting HostMicrosoft CorporationOpen with MS-DOS PromptLow
CScript.exeMicrosoft CorporationOpen with Command PromptVery High
CScript.exeOpen with Command PromptLow
CScript.exeMicrosoft ? Windows Script HostMicrosoft ? Console Based Script HostMicrosoft CorporationOpen with Command PromptHigh
devenv.exeMicrosoft Visual Studio .NET 2003Microsoft CorporationEdit with Visual Studio .NET 2003Medium
doxillion.exeDoxillionDoxillion Document ConverterNCH SoftwareConvert with DoxillionLow
FileTypesMan[1].exeFileTypesManFileTypesManNirSoftopenLow
Instant File Opener.exeInstant File OpenerInstant File OpenerMagnonic Software (Marcel Tetrault)Edit with Instant File OpenerLow
notepad++.exeNotepad++Notepad++ : a free (GNU) source code editorDon HO don.h@free.fropenLow
Notepad.exeEdit, PrintMedium
Notepad.exeNotesblokMicrosoft CorporationEdit, PrintLow
Notepad.exeNotepad++Notepad++ : a free (GNU) source code editorDon HO don.h@free.frEdit, PrintLow
Notepad.exeNotepadMicrosoft CorporationEdit, Open, PrintVery High
Notepad.exeMicrosoft? Windows? Operating SystemNotepadMicrosoft CorporationEdit, PrintLow
Notepad.exeAkelPadAkelPad (x86) text editorDruckenLow
Notepad.exeBloco de notasMicrosoft CorporationEditar, ImprimirMedium
Notepad.exeMicrosoft(R) Windows (R) 2000 Operating SystemNotepadMicrosoft CorporationEdit, PrintLow
Notepad.exeMicrosoft(R) Windows(R) Operating SystemWindows Notepad application fileMicrosoft CorporationEdit, PrintLow
Notepad.exeAnteckningarMicrosoft CorporationRedigera, Skriv utMedium
Notepad.exeKladblokMicrosoft CorporationEdit, PrintLow
Notepad.exeBloc de notasMicrosoft CorporationEdit, Open, PrintHigh
Notepad.exeEditorMicrosoft CorporationBearbeiten, DruckenVery High
Notepad.exeNotatnikMicrosoft CorporationEdit, PrintMedium
Notepad2.exeNotepad2EditLow
pdfcreator.exePDFCreatorPDFCreatorpdfforge http://www.pdfforge.org/Crea file PDF e Bitmap con PDFCreatorHigh
PrimalScript.exeSAPIEN PrimalScript 2012SAPIEN PrimalScript 2012SAPIEN Technologies, Inc.EditLow
PSPad.exePSPadPSPad editorProg-Soft s.r.o.EditLow
RunWithParms.exeRunWithParmsFoolish ITRun with ParametersLow
Scite.exeBearbeitenLow
ScriptCryptor.exeScriptCryptor CompilerScriptCryptorAbyss Media CompanyCompile with ScriptCryptorLow
Vbsedit.exeVbsEditVbsEditAdersoftEdit with VbsEdit, Edit with Vbsedit 32-bitLow
WScript.exeMicrosoft R Windows Script HostMicrosoft R Windows Based Script HostMicrosoft CorporationOpenMedium
WScript.exeMicrosoft (r) Windows Script HostMicrosoft (r) Windows Based Script HostMicrosoft CorporationOpenVery High
WScript.exeMicrosoft Windows Scripting HostWindows Based Scripting HostMicrosoft CorporationOpenLow
WScript.exeMicrosoft CorporationOpen, Run as AdministratorVery High
WScript.exeOpenLow
WScript.exeMicrosoft ? Windows Script HostMicrosoft ? Windows Based Script HostMicrosoft CorporationOpenHigh

In the following table, you can find a list of file types information that is associated with .vbs extension.

Type NameDescriptionPerceived TypeContentTypeDLL/EXE FileDLL/EXE DetailsPopularity
Notepad++_fileNotepad++ Documentnotepad++.exeNotepad++ : a free (GNU) source code editor, Don HO don.h@free.frLow
VBSFileFichier script VBScriptwscript.exeMicrosoft (r) Windows Based Script Host, Microsoft CorporationLow
VBSFileArquivo de script VBScriptwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationLow
VBSFilePlik skryptu VBScriptwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationLow
VBSFileVBScript-skriptfilwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationLow
VBSFileFile di script VBScriptwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationLow
VBSFileVBScript Script Filewscript.exeMicrosoft (r) Windows Based Script Host, Microsoft CorporationVery High
VBSFileArchivo de comandos VBScriptwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationMedium
VBSFileVBScript-Skriptdateiwscript.exeMicrosoft (R) Windows Based Script Host, Microsoft CorporationMedium
Registry keys related to this extension

HKEY_CLASSES_ROOT.vbs
HKEY_CLASSES_ROOTNotepad++_file
HKEY_CLASSES_ROOTVBSFile
Links to other Web sites
Search more extensions information:

If you are looking for information about another extension, you can try to find it inthe following alphabetic list:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Others

Post navigation

Buku Permainan Bola Basket Pdf To Jpg
Kajal Nedu Gif Photes

Search

Latest Pages

  • Professional Egr Remover Keygen Serial
  • Ishaqzaade Movie Hd Video Songs Free Download
  • Dd Podhigai Old Serials
  • Airlink101 Wireless N Usb Adapter Driver Awll6077
  • Audirvana Plus (free Version Download For Mac
  • Photo Booth App Download Apk
  • Download Torrent Izotope Ozone 8
  • Cfr Download Rct3 Fireworks
  • Mustapha Game For Android Free Download
Run Vbs File From Cmd Prompt В© 2020