Map network share with user credentials

I am trying to figure out how to map a network share, pass the same credentials that the user used to login to the client, and set this share as the path for File Explorer component. I posted a similar question a while back and someone suggested a “subprocess.call” but i am not sure how to get the user password used to login to the client and setup the subprocess correctly. Any help would be greatly appreciated.

Have you tried the code from the docs?

https://docs.inductiveautomation.com/display/DOC79/Mapping+a+Network+Drive

Kymera has as utility script module that allows you to interact with WIndows shares. It can be found on this page:

Enclosed is some example code:

#example smb://1.2.3.4/share3/folder2/file5.txt
#user=kymera\user4
system.net.writeFile(server="1.2.3.4",share="share3",filePath="folder2/file5.txt",domain="kymera",username="user4",password="super secret password",bytes="Text for my file",append=False)
text = system.net.readFileAsString(server="1.2.3.4",share="share3",filePath="folder2/file5.txt",domain="kymera",username="user4",password="super secret password")

Let me know what you think.