Map Network Drive...">

Open the Windows 7 "Network Drive Map" program code

I am trying to open a dialog which is manually accessible via "Computer> Map Network Drive" in Windows 7. Is there any programmatic way to open it directly, eg. with VBScript or PowerShell commands (not by triggering mouse or keyboard events)? I know the net use ...

shell command , but I specifically want to display this dialog.

+3
windows cmd powershell vbscript batch-file


source to share


2 answers


Use rundll32.exe to open the GUI from a script. It behaves the same as if you pressed a button.

RUNDLL32 SHELL32.DLL,SHHelpShortcuts_RunDLL Connect

      

enter image description here



Link included for additional tricks. The network drive map is # 24 in the list.

http://www.robvanderwoude.com/rundll.php

+6


source to share


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

+4


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics