# net.openURL : Windows can't open file

**URL:** <https://forum.inductiveautomation.com/t/net-openurl-windows-cant-open-file/12224>\
**Category:** General Discussion\
**Created:** [October 11, 2016, 12:19pm UTC](https://forum.inductiveautomation.com/t/net-openurl-windows-cant-open-file/12224 "2016-10-11T12:19:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [October 11, 2016, 12:19pm UTC](https://forum.inductiveautomation.com/t/net-openurl-windows-cant-open-file/12224/1 "2016-10-11T12:19:36Z")

</div>

Hi everybody !

I’ve created a script which open a pdf like this :

```auto
path = system.file.getTempFile(filetype)
system.file.writeFile(path, fileBytes)
system.net.openURL("file://" + path)
```

When I try to open a document with this code, I have the message below.

“Windows can’t open this file. To open this file, Windows needs to know what program you want to use to open it”.

Do you have a solutions ?

Thanks

---

<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:** [October 11, 2016, 1:34pm UTC](https://forum.inductiveautomation.com/t/net-openurl-windows-cant-open-file/12224/2 "2016-10-11T13:34:03Z")

</div>

Do you have a PDF reader installed and associated with the PDF file type?
