# Executing BAT file on VM

**URL:** https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770
**Category:** Discussion
**Created:** [June 6, 2011, 9:20am UTC](https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770 "2011-06-06T09:20:51Z")
**Posts on this page:** 4
**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: [June 6, 2011, 9:20am UTC](https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770/1 "2011-06-06T09:20:51Z")

</div>

&nbsp;Greetings,

First, let me start off by saying that I am new to both VMware and FinalBuilder. &nbsp;I have a project that so far does the following successfully:

&nbsp;

1. Starts the VM.
2. Takes a snapshot of the VM.
3. Copies the setup.exe from the host to the guest.
4. Copies the BAT file from the host to the guest.

What I want to do next is execute the BAT file. &nbsp;I just get errors that the run command fails, and I cannot make heads or tails of the documentation. &nbsp;Any help you can provide would be much appreciated.

&nbsp;

I am using FinalBuilder 7 and VMware Workstation 7.1.4.

&nbsp;

THANKS!!!!

---

<div class="post-metadata">

### Author: ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)
#### Post date: [June 7, 2011, 2:42am UTC](https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770/2 "2011-06-07T02:42:07Z")

</div>

Hi   
  
 I assume you are using the VMWare Execute Guest Command action to copy the files from the host to the guest VM and execute the BAT file?   
  
 Could you please provide the exact error message that you are getting when attempting to execute the batch file?   
  
 Regards,   
 Steve

---

<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: [June 7, 2011, 12:28pm UTC](https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770/3 "2011-06-07T12:28:54Z")

</div>

"Guest program exited with non-zero exit code: 1"

&nbsp;

Here is the command:

[http://imageshack.us/photo/my-image...mmand.jpg/](http://imageshack.us/photo/my-images/62/guestcommand.jpg/)

---

<div class="post-metadata">

### Author: ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)
#### Post date: [June 8, 2011, 1:36am UTC](https://www.finalbuilder.com/forums/t/executing-bat-file-on-vm/1770/4 "2011-06-08T01:36:20Z")

</div>

Hi   
  
 Could you please try creating a batch file that performs a simple operation (like creating a folder on the desktop) and run this using the action.   
  
 I am able to use this action to run a simple batch file that creates an empty folder on the desktop, so it may be something in this specific BAT file causing the error.   
  
 Regards,   
 Steve
