Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Ad icon
QA Engineer Intern
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Tips & Tricks
How to run .BAT files invisibly, without displaying the Command Prompt window
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="BLACKLIST_MEMBER" data-source="post: 2575068" data-attributes="member: 79414"><p><img src="http://www.winhelponline.com/blog/wp-content/uploads/batfile-icon.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>Batch files (.BAT) and Windows NT Command Script (.CMD) files run in console window when double-clicked. This means that the Command Prompt window will be visible until the .BAT/.CMD file execution is complete. To make .BAT or .CMD file execution less intrusive, you can configure it to run minimized. Or if the .BAT or .CMD file does not require user input during run time, you can launch it in invisible mode using a Script. Both options are discussed below.</p><p> <strong>Running .BAT or .CMD files in minimized mode</strong></p><p></p><p> 1. Create a shortcut to the .BAT or .CMD file. To do so, right click on the file, click <strong>Send To</strong>, <strong>Desktop (create shortcut)</strong></p><p> 2. Right click on the shortcut and choose <strong>Properties</strong></p><p> 3. In the <strong>Run:</strong> drop down, choose <strong>Minimized</strong></p><p> 4. Click <strong>OK</strong></p><p> 5. Double-click the shortcut to run the batch file in a minimized window state.</p><p> <strong>Running .BAT or .CMD files in invisible mode</strong></p><p></p><p> Windows Script Host’s <strong>Run</strong> Method allows you run a program or script in invisible mode.</p><p> <strong>Sample Code</strong></p><p>[code]Set WshShell = CreateObject("WScript.Shell") </p><p>WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0</p><p>Set WshShell = Nothing[/code]</p><p></p><p></p><p>Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.</p><p> (Ref: <a href="http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx" target="_blank">Run Method</a>. Setting <strong>intWindowStyle</strong> parameter to 0 hides the window)</p></blockquote><p></p>
[QUOTE="BLACKLIST_MEMBER, post: 2575068, member: 79414"] [IMG]http://www.winhelponline.com/blog/wp-content/uploads/batfile-icon.png[/IMG] Batch files (.BAT) and Windows NT Command Script (.CMD) files run in console window when double-clicked. This means that the Command Prompt window will be visible until the .BAT/.CMD file execution is complete. To make .BAT or .CMD file execution less intrusive, you can configure it to run minimized. Or if the .BAT or .CMD file does not require user input during run time, you can launch it in invisible mode using a Script. Both options are discussed below. [B]Running .BAT or .CMD files in minimized mode[/B] 1. Create a shortcut to the .BAT or .CMD file. To do so, right click on the file, click [B]Send To[/B], [B]Desktop (create shortcut)[/B] 2. Right click on the shortcut and choose [B]Properties[/B] 3. In the [B]Run:[/B] drop down, choose [B]Minimized[/B] 4. Click [B]OK[/B] 5. Double-click the shortcut to run the batch file in a minimized window state. [B]Running .BAT or .CMD files in invisible mode[/B] Windows Script Host’s [B]Run[/B] Method allows you run a program or script in invisible mode. [B]Sample Code[/B] [code]Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0 Set WshShell = Nothing[/code] Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it. (Ref: [URL="http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx"]Run Method[/URL]. Setting [B]intWindowStyle[/B] parameter to 0 hides the window) [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom