Avatar ·

How to open a network folder with a password in Windows?

📁 python

I need to open a network folder in a conductor from a Python script.

I can open network folders without a password via Startfile:

  os.startfile ( r "" \\ 192.168.1.2 \ folder "" )     

the problem is that I need to open a network folder with a password, and then Startfile gives an error:

  Oserror: [Winerror ] network password is indicated incorrectly:  '\\\\ 192.168.1.3 \\ folder'      

, firstly, where can I indicate the network password?

, is it possible to somehow display the standard password in the password of the conductor and allow the user to enter the password into the conductor without touching Python script? I tried to open Explorer.exe through subprocess.popen , but the launched conductor simply ignores the second argument and opens the user's folder & laquo; documents & raquo; Instead of a network folder.