I have tried many different ways to accomplish this however to no avail. here is my code.
B4X:
Dim runit As Shell
Private switches As List
switches.Initialize
switches.Add("/user:johns")
switches.Add("password")
runit.Initialize("net use J:",$"\\example\windows\share"$,switches)
runit.RunSynchronous(-1)