# About execute cmd.exe

**URL:** <https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [October 23, 2024, 5:45am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645 "2024-10-23T05:45:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![seunghwan\_park](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@seunghwan\_park](https://forum.inductiveautomation.com/u/seunghwan_park)\
**Post date:** [October 23, 2024, 5:45am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/1 "2024-10-23T05:45:58Z")

</div>

I want to open a CMD window.

It works fine in the 'script console', but when I place the code in other events like onclick or gateway events, the CMD window does not appear.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/a/5a1114620193ed4f594b9f3926099b9c7942ec71.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 23, 2024, 7:05am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/2 "2024-10-23T07:05:28Z")

</div>

Designer is running on your local PC.  
Gateway is running on the gateway computer so you are trying to open a CMD window on _it_.

Browser security would never allow a script to open a CMD window and execute command line code.

---

<div class="post-metadata">

**Author:** ![seunghwan\_park](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@seunghwan\_park](https://forum.inductiveautomation.com/u/seunghwan_park)\
**Post date:** [October 23, 2024, 8:03am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/3 "2024-10-23T08:03:16Z")

</div>

Not only CMD but also executing other files shows the same symptom  
then how can i do it?  
i want to run a .bat file

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 23, 2024, 9:27am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/4 "2024-10-23T09:27:26Z")

</div>

is this bat file on the gateway?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 23, 2024, 10:26am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/5 "2024-10-23T10:26:58Z")

</div>

> [@seunghwan\_park](#):
>
> i want to run a .bat file

If you want your user interface to be able to interact with the operating system of the client PC then you need to use Vision, not Perspective. This is deliberate policy by the browser standards, not by Ignition. Any way to bypass this would be quickly exploited by malware sites.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 23, 2024, 11:14am UTC](https://forum.inductiveautomation.com/t/about-execute-cmd-exe/97645/6 "2024-10-23T11:14:51Z")

</div>

Well installing an uri on clients is still an option. If you somehow choose perspective and need to do something on a local pc
