After I start my laptop and connect to corporate network via VPN I get the environment and all necessary credentials to access network resources.
But CIFS share mapped to the drive letter is only connected when I click on it in Windows file explorer.
After that I am able to run batch file, which opens several Windows explorer folders on that share. Here is the example of the command from the batch file:
start /min C:Windowsexplorer.exe /n, /e, Z:01data
timeout 3
... next command
Without that extra clicking to the drive the command from the batch file is not capable of opening the folder on the share.
I would like to consider either set Windows command(s) which will connect the drive or create python script to do it. Add one of these solutions to the beginning of the batch file and run all commands together without manual intrusion.
question from:
https://stackoverflow.com/questions/65952614/how-to-connect-to-cifs-share-mapped-to-the-letter-using-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…