I need to map a network drive into a network path using VBScript. The network path is read directly from input. How should I map the network drive and how to check whether the entered network path already exists?
相关问题
- How to programmatically convert Access 1997 .mdb t
- VBScript / ADODB Syntax Issue with adArray?
- How to check default host for VBScript is WScript
- vbscript is not working on IE10 browser mode
- Using asp objects in .NET - Max compatibility
相关文章
- Can a VBScript function return a dictionary?
- UTC Time Assignment in VBScript
- Copy and Rename File VBScript
- How do I open a file with VBScript?
- Import WinAPI Function in *.VBS File
- How to reference the mail which triggered the outl
- Classic ASP/VBScript implementation of Crockford
- Convert .csv file into Excel in VBScript
I created a subroutine to map drives...
I leave it up to you do handle error checking etc. Alternatively if you prefer the net use route you could do something like..
You can take it a step further to automagically use the next available drive letter to map drives using an example The Scripting Guys created.
I hope this is helpful.
run the following command in you vbscript file:
for example:
The sample command will map \Hadi\temp to Z:
Also take a look at this VBScript file for mapping network drives.