Home > MED-V > MED-V: Published Batch Files/Command Scripts Should use Internal Start Command to Call

MED-V: Published Batch Files/Command Scripts Should use Internal Start Command to Call


Whether you are using MED-V versions 1.0 or 2.0, batch files or published batch files (or command scripts) with MED-V should be approached in the same manner. Essentially, when you are publishing any script using *.BAT or *.CMD extensions, you may find the parent command window never closes when spawning the external command.

For example,

If you were to run the following batch file:

call \\NETWORK\FOLDER\FOLDER\FOLDER\master.bat
%SystemRoot%\explorer.exe “\\NETWORK\FOLDER
exit

The end result would be an open explorer window with a parent command prompt window remaining open until explorer is closed.

This is a design issue with command processing and batch files when using default syntax.

To resolve this, replace the last command by pre-pending a start command to it to make the window disappear.

Use the following syntax:

call \\NETWORK\FOLDER\FOLDER\FOLDER\master.bat
start %SystemRoot%\explorer.exe “\\NETWORK\FOLDER
exit

Categories: MED-V Tags: , , , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: