# Network Drive Reconnecting

**URL:** <https://forum.inductiveautomation.com/t/network-drive-reconnecting/70602>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [March 3, 2023, 7:37pm UTC](https://forum.inductiveautomation.com/t/network-drive-reconnecting/70602 "2023-03-03T19:37:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsmith1](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@dsmith1](https://forum.inductiveautomation.com/u/dsmith1)\
**Post date:** [March 3, 2023, 7:37pm UTC](https://forum.inductiveautomation.com/t/network-drive-reconnecting/70602/1 "2023-03-03T19:37:59Z")

</div>

I have mapped a few network drives to ignition my modifying the `ignition.conf` file as described in this article: [Mapping a Network Drive - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)](https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive)

So my `ignition.conf` has a section similar to this:

```auto
wrapper.share.1.location=\\fileserver\folder
wrapper.share.1.target=Z:
wrapper.share.1.type=DISK
wrapper.ntservice.account=user
wrapper.ntservice.password=password
wrapper.share.1.account=domain\user
wrapper.share.1.password=password

```

This worked fine...until it didn't. While troubleshooting I found that windows was reporting that the networked drives were "disconnected" (even though I could browse them) so assumption was that the networked drive connection got broken at some point and was never cleanly re-established, if that makes sense? It seems like restarting the Ignition service or server itself would resolve it.

My question is: is there a way to automatically "reconnect" Ignition's mapped drives? My understanding is the changes to `ignition.conf` above connect things upon startup, but is there anything I can do while Ignition is run, as a timed script every X hours or so to prevent the need for human intervention?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 3, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/network-drive-reconnecting/70602/2 "2023-03-03T21:23:41Z")

</div>

> [@dsmith1](#):
>
> My question is: is there a way to automatically "reconnect" Ignition's mapped drives?

No. The whole drive-mapping in the wrapper is a kludge. Run your gateway service as a user that has network privileges to the necessary resources, and then use UNC paths in all of your scripts. Those will connect/cache/reconnect at the time of use.

---

<div class="post-metadata">

**Author:** ![dsmith1](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@dsmith1](https://forum.inductiveautomation.com/u/dsmith1)\
**Post date:** [March 6, 2023, 6:51pm UTC](https://forum.inductiveautomation.com/t/network-drive-reconnecting/70602/3 "2023-03-06T18:51:28Z")

</div>

Pretty much what I have currently, just wanted clarity this was the best possible solution. Thanks Phil!
