Why is my mapped network drive not appearing in Network Locations?
<p>I'm using Windows 10. Here is my code to map the network drive.</p>

<pre><code>System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = true;
p.StartInfo.Verb = "runas";
p.StartInfo.FileName = "net.exe";
p.StartInfo.Arguments = "use Z: " + dPath; //dPath has escaped characters
p.Start();
</code></pre>

<p>What I was trying to do was trying to run the command <code>net.exe use Z: DPATH</code> as administrator but the Z drive does not appear in File Explorer but when I run the exact same command using cmd with Admin rights, the Z drive appears correctly.</p>

<hr>

<p><strong>Proof of mapped drive</strong></p>

<p>My Network drive is mapped as evidenced below (Encountered this error when trying to re-map it manually) just that it wasn't appearing under Network Locations in File Explorer > This PC. </p>

<p><a href="https://i.stack.imgur.com/2Pk4G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Pk4G.png" alt="attemptingToMap"></a></p>