Mapping a network drive and checking for its existence in VBScript

后端 未结 2 638
广开言路
广开言路 2021-01-07 06:51

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 t

2条回答
  •  被撕碎了的回忆
    2021-01-07 07:33

    run the following command in you vbscript file:

    net use [NetDrive:] [Network Path]
    

    for example:

    net use Z: \\Hadi\temp
    

    The sample command will map \Hadi\temp to Z:

    Also take a look at this VBScript file for mapping network drives.

提交回复
热议问题