subst p: c:\temp
It’s very useful when you test out the application that uses a network mapped drive so you can have a complete test environment right on your local machine.
…
If you want to make them like a permanent driver that doesn’t disappear, you can either
Create a new registry entry “string value” in the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
The name of the entry should be “X:” where X is the drive letter you want to make.
And the value of the entry should be the local path in the form of: \??\c:\path
Read more: Greg's Cool [Insert Clever Name] of the Day