Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Available space on NAS
Message
From
20/02/2014 23:52:47
 
 
To
20/02/2014 23:40:47
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01594835
Message ID:
01594861
Views:
44
>>For lurkers: http://www.vbforums.com/showthread.php?616519-Mapping-a-network-drive
>>
>>Or, if you can run commands in a CMD window
>>
>>NET USE Z: \\Host\ShareName
>>
>>and when you're finished
>>NET USE Z: /DEL
>>
Or do you mean for some reason you don't have local permissions to map a drive letter?
>
>We should not use that into that environment. Everything is UNC, no mapped drive.

You'd only be using a mapped drive letter temporarily, to work around a hole in the .Net framework; and cleaning up after yourself. IMO much cleaner than parsing the results of a DIR command, which strikes me as being very fragile. It might be affected by DIRCMD, maybe European users get results in a different language, or they use "." instead of "," as thousands separator etc. etc.

>Also, PUSHD would be better as it would create the map drive letter in cache only until the command window is closed.

You'd need to test that. You may find that PUSHD creates a drive letter that is strictly local to that instance of the CMD shell, and does not affect the rest of your session and its other processes. You definitely would not want that behaviour.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform