更新时间:2022-02-21 01:53:01
此问题的可接受答案此处似乎值得研究;它建议使用Win32 API函数 WNetUseConnection 。
The accepted answer on this question here seems like it would be worth looking into; it suggests using the Win32 API function WNetUseConnection.
从MSDN:
WNetUseConnection 函数与网络资源建立
连接。
函数可以将本地设备
重定向到网络资源。
The WNetUseConnection function makes a connection to a network resource. The function can redirect a local device to a network resource.
这似乎可以完成您的任务重新查找,而没有提及 net.exe
。这有帮助吗?
Which seems to accomplish what you're looking for, with no mention of net.exe
. Does this help?