# Executing a DOS command

**URL:** https://www.finalbuilder.com/forums/t/executing-a-dos-command/984
**Category:** Discussion
**Created:** [September 26, 2008, 1:44am UTC](https://www.finalbuilder.com/forums/t/executing-a-dos-command/984 "2008-09-26T01:44:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 26, 2008, 1:44am UTC](https://www.finalbuilder.com/forums/t/executing-a-dos-command/984/1 "2008-09-26T01:44:50Z")

</div>

Hi,

I declared a variable g\_mstest and set it default value to like this

%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe

And in the Run Dos Command action i gave %g\_mstest%

but it gave the below error

'C:\Program' is not recognized as an internal or external command,

Am i did something wrong while assigning the value?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 29, 2008, 1:29am UTC](https://www.finalbuilder.com/forums/t/executing-a-dos-command/984/2 "2008-09-29T01:29:10Z")

</div>

Hi

You should use the Execute Program Action, the Run Dos Command is intended for just that, running dos commands and batch files.

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 29, 2008, 5:56am UTC](https://www.finalbuilder.com/forums/t/executing-a-dos-command/984/3 "2008-09-29T05:56:57Z")

</div>

thank you.&nbsp; it solved my problem
