i would like setup script which can connect network drive like this:
net use v: /delete || EXIT /B 1
net use v: "\\vmware-hostservername\share Folder"
I need to cover two scenario.
- Run test after restarting of PC (no disc v: available)
- run test repeatedly. Disc v: already exists and need to be deleted and mapped again.
I cannot put it to the window startup, because there are timeouts for disconnecting and the mapping need to done before running the script, so it ensures the drive will be available (and not disconnected).
The scrip provided does not work after restarting PC because v: does not exists. It need some modification like
if exists V: net use v: /delete || EXIT /B 1
I am not too familiar with batch syntax of above psedocode.