In my case it was enough to issue this command without specifying a drive name Process.Start("net.exe", "use \\Server\URI\path\here /USER:<username> <password>" ). And then any subsequent attempt to access this path won't ask for credentials.
–
MonsingorFeb 3 at 13:40