21

I am coding on something and want to map \cygwin\home\bob\code\ to U: drive letter. When I try to map it using net use C:\cygwin\home\bob\code\ U: /P:yes , but it gave the following error:

System error 67 has occurred
The network name cannot be found

But it's not actually a network path I'm trying to map. How do I do this?

Flimzy
  • 4,465

4 Answers4

25

If it is only local what you need, try subst.

subst u: C:\cygwin\home\bob\code\
R-D
  • 2,556
4

Use vSubst. It is like the subst command line tool, but it has a UI and is persistent.

screenshot

Kevin
  • 2,101
2

When you map drives they must be mapped to a SHARED network folder. You are trying to map to a local path, it won't work. Instead try sharing the Code folder then use this:

net use u: \\yourpcname\code /p:yes

paradd0x
  • 9,351
Mucker
  • 827
1

The best way to do this across bootup is to put it in the registry. Open regedit.exe by pressing Win + R and typing regedit then hit Enter or click OK. Navigate to HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ DOS Devices

Add a new string that is a REG_SZ value. Name it X: where X is your drive letter The value should be the path you want mapped to that drive letter, in this form:

\DosDevices\C:\Folder\Example

DrZoo
  • 11,391
Malcolm
  • 11