Tuesday, November 17, 2015

How to use net user?

I’m 99.44% sure that you cannot either cd or pushd to a UNC path.
net use * \\192.168.1.109\home
(the syntax identified in Ilya’s answerwith your values substituted) will map the folder on the remote computer to an artificial disk drive device on your system.  The device will have a one-letter name, and the command will tell you what it is:
Drive Z: is now connected to \\192.168.1.109\home
If you have a favorite letter that you want to use and that you know is not assigned to anything else, you can specifiy it as follows:
net use S: \\root\home
Note that you can simply put the hostname in the place of the IP address.
At least, you can do all of this if the remote computer is also running Windows.  If it isn’t, it still might work, but I’m not sure.
Do you know how to navigate a Windows system with multiple disk (pseudo-)devices?  Most people move between disks in two steps:
C:\> S:                              // Note: type just the drive letter and colon.
S:\> cd \home
S:\home>
or
C:\> cd S:\home              // Note: this doesn’t actually put you into S:\home.
C:\> S:                              // Now you’re there.
S:\home>
but there is a slightly shorter way:
C:\> cd /d S:\home          // cd/d means change directory and drive in one step.
S:\home>                              // Ta da!