AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I open the "Microsoft Windows Network" icon

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
quatermass



Joined: 14 Dec 2005
Posts: 136

PostPosted: Thu Sep 04, 2008 10:54 am    Post subject: How do I open the "Microsoft Windows Network" icon Reply with quote

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.

Sad
_________________
Stuart Halliday
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Thu Sep 04, 2008 11:02 am    Post subject: Reply with quote

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

PostPosted: Thu Sep 04, 2008 11:32 am    Post subject: Reply with quote

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'. Smile
_________________
Stuart Halliday
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Thu Sep 04, 2008 11:41 am    Post subject: Reply with quote

Once you can accomplish that, what's your final target?

Assumption: [this] ?
Back to top
quatermass



Joined: 14 Dec 2005
Posts: 136

PostPosted: Thu Sep 04, 2008 12:46 pm    Post subject: Reply with quote

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. Wink

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. Rolling Eyes
_________________
Stuart Halliday
Back to top
View user's profile Send private message
quatermass



Joined: 14 Dec 2005
Posts: 136

PostPosted: Sat Sep 06, 2008 9:44 pm    Post subject: Reply with quote

Wow. Have I actually stumped the experts?

Shocked

Very Happy
_________________
Stuart Halliday
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Sat Sep 06, 2008 10:13 pm    Post subject: Reply with quote

I guess the keywords are: CLSID + COM
Back to top
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Sat Sep 06, 2008 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Sun Sep 07, 2008 3:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
quatermass



Joined: 14 Dec 2005
Posts: 136

PostPosted: Sun Sep 07, 2008 9:36 pm    Post subject: Reply with quote

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. Very Happy
Thanks.
_________________
Stuart Halliday
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1397

PostPosted: Sun Sep 07, 2008 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Mon Sep 08, 2008 12:39 am    Post subject: Reply with quote

wow. just wow.
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
quatermass



Joined: 14 Dec 2005
Posts: 136

PostPosted: Mon Sep 08, 2008 11:14 am    Post subject: Reply with quote

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. Laughing

Thanks Sean.
_________________
Stuart Halliday
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group