I am trying to open the dialog which is manually accessible through "Computer > Map Network Drive" on Windows 7. Is there any programmatic way to open it directly, e.g. with VBScript or PowerShell commands (not by firing mouse or keyboard events)? I am aware of net use ... shell command, but I specifically want to display that dialog.
3
votes
2 Answers
6
votes
4
votes
Try WNetConnectionDialog:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385433%28v=vs.85%29.aspx
or WNetConnectionDialog1:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385436%28v=vs.85%29.aspx
