WNetAddConnection2 from a Windows Service

后端 未结 5 1128
一向
一向 2021-01-01 06:50

I\'m trying to connect to a remote password protected shared folder from a Windows service, which runs as LocalSystem account. It seems that the LocalSystem account is unabl

5条回答
  •  独厮守ぢ
    2021-01-01 07:35

    import win32wnet from win32netcon import RESOURCETYPE_DISK as DISK path="\192.168.1.11\Student" win32wnet.WNetAddConnection2(DISK,"R:","\192.168.1.11\Student",None,"Student","pass",0)

提交回复
热议问题