| View previous topic :: View next topic |
| Author |
Message |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Thu Sep 04, 2008 10:54 am Post subject: How do I open the "Microsoft Windows Network" icon |
|
|
I want AHK to open the "Microsoft Windows Network" Icon on a LAN on a XP PC.
ie under My Network Places >Entire Network > Microsoft Windows Network
These are special icons, a bit like the Control Panel one I suppose.
So is it a rundll32 command? I can't find out what the magic recipe is though.
I tried:
http://www.vbexplorer.com/VBExplorer/shellcpl.htm
http://dx21.com/coding/libraries/rundll32/default.aspx
and a few others.
 _________________ Stuart Halliday |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Sep 04, 2008 11:02 am Post subject: |
|
|
| Quote: | | !y::Run, rundll32.exe shell32.dll`,Control_RunDLL ncpa.cpl ; press ALT+y to execute that command | Not tested. |
|
| Back to top |
|
 |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Thu Sep 04, 2008 11:32 am Post subject: |
|
|
| BoBo² wrote: | | Quote: | | !y::Run, rundll32.exe shell32.dll`,Control_RunDLL ncpa.cpl ; press ALT+y to execute that command | Not tested. |
That opens 'Network Connections'.  _________________ Stuart Halliday |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Sep 04, 2008 11:41 am Post subject: |
|
|
Once you can accomplish that, what's your final target?
Assumption: [this] ? |
|
| Back to top |
|
 |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Thu Sep 04, 2008 12:46 pm Post subject: |
|
|
| BoBo² wrote: | Once you can accomplish that, what's your final target?
Assumption: [this] ? |
No, just to open this window and allow the user to choose which domain they wish to examine.
I know how to do network drives.
It's so annoying that I can't do this, I can put the shortcut on the desktop. But I can't read the properties of how to call it up! So damn close.  _________________ Stuart Halliday |
|
| Back to top |
|
 |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Sat Sep 06, 2008 9:44 pm Post subject: |
|
|
Wow. Have I actually stumped the experts?
 _________________ Stuart Halliday |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Sat Sep 06, 2008 10:13 pm Post subject: |
|
|
| I guess the keywords are: CLSID + COM |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Sat Sep 06, 2008 10:17 pm Post subject: |
|
|
You could try using Winspector to see if it can be called via Post/SendMessage. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sun Sep 07, 2008 3:03 pm Post subject: |
|
|
the easiest is going to be to create a shortcut and then run that shortcut. you should be able to create it once, on any computer then urldownloadtofile it or something on each other pc. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Sun Sep 07, 2008 9:36 pm Post subject: |
|
|
| ahklerner wrote: | | the easiest is going to be to create a shortcut and then run that shortcut. you should be able to create it once, on any computer then urldownloadtofile it or something on each other pc. |
That sounds do able.
Thanks. _________________ Stuart Halliday |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Sun Sep 07, 2008 11:21 pm Post subject: |
|
|
Well, thinking about what clicking the icon means in the explorer would give a hint.
| Code: | COM_Init()
psh := COM_CreateObject("Shell.Application")
pnn := COM_Invoke(psh, "NameSpace", CSIDL_NETWORK:=18)
pi1 := COM_Invoke(pnn, "Items")
Loop, % COM_Invoke(pi1, "Count")
If COM_Invoke(pf1:=COM_Invoke(pi1, "Item", A_Index-1), "Path") <> "EntireNetwork"
COM_Release(pf1), pf1:=0
Else Break
psf := COM_Invoke(pf1, "GetFolder")
COM_Release(pf1)
COM_Release(pi1)
pi2 := COM_Invoke(psf, "Items")
Loop, % COM_Invoke(pi2, "Count")
If COM_Invoke(pf2:=COM_Invoke(pi2, "Item", A_Index-1), "Path") <> "Microsoft Windows Network"
COM_Release(pf2), pf2:=0
Else Break
COM_Invoke(pf2, "InvokeVerb")
COM_Release(pf2)
COM_Release(pi2)
COM_Release(psf)
COM_Release(pnn)
COM_Release(psh)
COM_Term()
|
|
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Mon Sep 08, 2008 12:39 am Post subject: |
|
|
wow. just wow. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
quatermass
Joined: 14 Dec 2005 Posts: 136
|
Posted: Mon Sep 08, 2008 11:14 am Post subject: |
|
|
| Sean wrote: | Well, thinking about what clicking the icon means in the explorer would give a hint.
|
Cute, works too.
So that simulates opening and clicking on an Explorer window?
I suspect I may need some extra library to use that code?
(I added the COM library to it.)
This is seriously advanced control for little old me.
Thanks Sean. _________________ Stuart Halliday |
|
| Back to top |
|
 |
|