# Error opening a file with system.net.openURL

**URL:** <https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836>\
**Category:** Ignition\
**Created:** [November 20, 2020, 1:04pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836 "2020-11-20T13:04:33Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [November 20, 2020, 1:04pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/1 "2020-11-20T13:04:33Z")

</div>

I have an error trying to open a file with the function system.net.openURL  
My code is:

```auto
filePath='C:\Users\l.abdallah.ext\Desktop\20201120_134830_AlarmStatusTable.xlsx'

system.net.openURL("file:" + filePath)

```

Error:

```auto
java.io.IOException: java.io.IOException: Cannot run program "command.com": CreateProcess error=2, , The system cannot find the file specified

```

Ignition 8.0.12  
Windows 10 x64

Thanks you

---

<div class="post-metadata">

**Author:** ![rbabcock](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbabcock/32/13425_2.png) [@rbabcock](https://forum.inductiveautomation.com/u/rbabcock)\
**Post date:** [November 20, 2020, 3:15pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/2 "2020-11-20T15:15:22Z")

</div>

Try escaping your backslashes, python. Right now it’s reading your filePath as:  
`C:\Users\l.abdallah.ext\Desktop�01120_134830_AlarmStatusTable.xlsx`

```auto
filePath='C:\\Users\\l.abdallah.ext\\Desktop\\20201120_134830_AlarmStatusTable.xlsx'
print filePath
>>> C:\Users\l.abdallah.ext\Desktop\20201120_134830_AlarmStatusTable.xlsx

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 22, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/3 "2020-11-22T21:24:43Z")

</div>

Also, I believe you need double forward slashes after file:.

```auto
filePath='C:\\Users\\l.abdallah.ext\\Desktop\\20201120_134830_AlarmStatusTable.xlsx'

system.net.openURL("file://" + filePath)

```

[https://docs.inductiveautomation.com/display/DOC79/system.net.openURL](https://docs.inductiveautomation.com/display/DOC79/system.net.openURL)

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [November 23, 2020, 9:06am UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/4 "2020-11-23T09:06:07Z")

</div>

thanks for the answer guys, but I still have the problem. 😑 😑

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 23, 2020, 10:14am UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/5 "2020-11-23T10:14:55Z")

</div>

Try a simpler path, like `c:\\temp\\new.txt`

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [November 23, 2020, 10:35am UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/6 "2020-11-23T10:35:28Z")

</div>

i think it’s java problem

```auto
Traceback (most recent call last):  
  File "<event:mouseClicked>", line 92, in <module>  
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)  
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)  
    at java.base/java.lang.Runtime.exec(Unknown Source)  
    at java.base/java.lang.Runtime.exec(Unknown Source)  
    at com.inductiveautomation.ignition.client.util.BrowserLauncher.browse(BrowserLauncher.java:644)  
    at com.inductiveautomation.ignition.client.util.BrowserLauncher.openURL(BrowserLauncher.java:557)  
    at com.inductiveautomation.factorypmi.application.script.builtin.VisionNetUtilities.openURL(VisionNetUtilities.java:67)  
    at com.inductiveautomation.factorypmi.application.script.builtin.VisionNetUtilities.openURL(VisionNetUtilities.java:46)  
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
java.io.IOException: java.io.IOException: Cannot run program "command.com": CreateProcess error=2, El sistema no puede encontrar el archivo especificado  
  
    at org.python.core.Py.JavaError(Py.java:552)  
    at org.python.core.Py.JavaError(Py.java:543)  
    at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:190)  
    at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:521)  
    at org.python.core.PyObject. __call__ (PyObject.java:480)  
    at org.python.core.PyObject. __call__ (PyObject.java:484)  
    at org.python.pycode._pyx37.f$0(<event:mouseClicked>:92)  
    at org.python.pycode._pyx37.call_function(<event:mouseClicked>)  
    at org.python.core.PyTableCode.call(PyTableCode.java:171)  
    at org.python.core.PyCode.call(PyCode.java:18)  
    at org.python.core.Py.runCode(Py.java:1614)  
    at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:779)  
    at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:206)  
    at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:297)  
    at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:57)  
    at com.sun.proxy.$Proxy58.mouseClicked(Unknown Source)  
    at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)  
    at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)  
    at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)  
    at java.desktop/java.awt.Component.processEvent(Unknown Source)  
    at java.desktop/java.awt.Container.processEvent(Unknown Source)  
    at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)  
    at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
    at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
    at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
    at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)  
    at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
    at java.base/java.security.AccessController.doPrivileged(Native Method)  
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
    at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
    at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
    at java.base/java.security.AccessController.doPrivileged(Native Method)  
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
    at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
    at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)  
Caused by: java.io.IOException: Cannot run program "command.com": CreateProcess error=2,The system cannot find the file specified
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)  
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)  
    at java.base/java.lang.Runtime.exec(Unknown Source)  
    at java.base/java.lang.Runtime.exec(Unknown Source)  
    at com.inductiveautomation.ignition.client.util.BrowserLauncher.browse(BrowserLauncher.java:644)  
    at com.inductiveautomation.ignition.client.util.BrowserLauncher.openURL(BrowserLauncher.java:557)  
    at com.inductiveautomation.factorypmi.application.script.builtin.VisionNetUtilities.openURL(VisionNetUtilities.java:67)  
    at com.inductiveautomation.factorypmi.application.script.builtin.VisionNetUtilities.openURL(VisionNetUtilities.java:46)  
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
    at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)  
    ... 44 more  
Caused by: java.io.IOException: CreateProcess error=2,The system cannot find the file specified  
    at java.base/java.lang.ProcessImpl.create(Native Method)  
    at java.base/java.lang.ProcessImpl.<init>(Unknown Source)  
    at java.base/java.lang.ProcessImpl.start(Unknown Source)  
    ... 57 more  
  
Ignition v8.0.12 (b2020042115)  
Java: Azul Systems, Inc. 11.0.6 

```

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [December 8, 2020, 4:41pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/7 "2020-12-08T16:41:50Z")

</div>

Hi , did you find a solution? I have the same problem, it used to work fine before.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 8, 2020, 5:07pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/8 "2020-12-08T17:07:55Z")

</div>

What version of Ignition and Windows are you using (full version including patches if possible)? Did you install a Windows update recently?

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [December 8, 2020, 7:30pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/9 "2020-12-08T19:30:40Z")

</div>

Hi,  
Thanks for fast reply. We are currently working on igntion 8.1 with windows server 2019 up too 1809. We recently update to the latest igntion as well as updating oir windows server.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 8, 2020, 7:34pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/10 "2020-12-08T19:34:28Z")

</div>

What version of Windows is the client or designer that is running this function? It doesn’t matter as much what Windows version the gateway is running on.

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [December 8, 2020, 7:44pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/11 "2020-12-08T19:44:09Z")

</div>

Hi, we are running the client on windows server 2019 also and accessing it via remote desktop app on an android tablet.  
Thanks

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [December 9, 2020, 9:03am UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/12 "2020-12-09T09:03:36Z")

</div>

windows server 2019 standard

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [January 7, 2021, 7:33pm UTC](https://forum.inductiveautomation.com/t/error-opening-a-file-with-system-net-openurl/40836/13 "2021-01-07T19:33:54Z")

</div>

Hi, a friend found a way to work around the problem try this:  
_system.util.execute([‘explorer.exe’, ‘‘selectedfilepathhere’’])_  
Let me know if it works!
