# Issue while running system commands inside Sketchup ruby extension , in Windows VM running with Parallels on Mac

**URL:** <https://forums.sketchup.com/t/issue-while-running-system-commands-inside-sketchup-ruby-extension-in-windows-vm-running-with-parallels-on-mac/28294>\
**Category:** Ruby API\
**Tags:** advice, ruby, system, command\
**Created:** [July 25, 2016, 9:56am UTC](https://forums.sketchup.com/t/issue-while-running-system-commands-inside-sketchup-ruby-extension-in-windows-vm-running-with-parallels-on-mac/28294 "2016-07-25T09:56:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sampath\_kumarkrishnan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sampath\_kumarkrishnan](https://forums.sketchup.com/u/sampath_kumarkrishnan)\
**Post date:** [July 25, 2016, 9:56am UTC](https://forums.sketchup.com/t/issue-while-running-system-commands-inside-sketchup-ruby-extension-in-windows-vm-running-with-parallels-on-mac/28294/1 "2016-07-25T09:56:14Z")

</div>

In my Sketchup ruby extension, I have to run certain system commands (like running another .exe).  
For this purpose, in ruby script, I create a batch file and write the command into it.

To run the batchfile I used the following syntax.

> batchPath = “path\_of\_batch\_file”

> `cmd /c #{batchPath}`

This command runs fine in most windows machines. But in a Mac book, which has a Windows 7 VM installed on it using Parallels, this command does not run. Even in the mac book, it is running fine in Sketchup 2015. But the problem occurs only when running the ruby extension in Sketchup 2016 , in the specific PC.

Apart from using Backticks, I have tried other ways of running batch files from ruby namely,

> system(“cmd /c #{batchPath}”)

> %x[“cmd /c #{batchPath}”]

> UI.openURL(‘file:///’+batchPath)

Only the last option, UI.openURL works in the above specified PC ( Sketchup 2016 in Windows VM on Mac).

Is there any change in how command line commands are to be handled, with respect to Sketchup 2016 ?  
Or is it something related to accessing system commands in a VM ?

---

<div class="post-metadata">

**Author:** ![Geo](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/geo/32/82_2.png) [@Geo](https://forums.sketchup.com/u/Geo)\
**Post date:** [July 25, 2016, 8:15pm UTC](https://forums.sketchup.com/t/issue-while-running-system-commands-inside-sketchup-ruby-extension-in-windows-vm-running-with-parallels-on-mac/28294/2 "2016-07-25T20:15:03Z")

</div>

> [@sampath\_kumarkrishnan](#):
>
> Mac book, which has a Windows 7 VM installed on it using Parallels

See:  
**[SketchUp Hardware and Software Requirements](http://help.sketchup.com/en/article/36208)** \> Unsupported Environments — SketchUp Help
