Net Use Command:
To Add a Drive
net use (drive-name): \\Servername\Foldername :persistent
To Delete a Mapped Drive
net use (Drivename): /del or net use (Drivename): /delete
In case if you get any error while running the Net use command like : NET NOT RECOGNIZED AS A COMMAND
Then Follow the Below Steps:
Open Command Prompt> Go To “C” Drive> “Windows” Folder> “System 32″ Folder”
and then run the Net Use Command mentioned above.
Also check the below Value:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
I suspect it is a Reg_SZ value. It should be a Reg_Expand_SZ value