INetwork.GetName() unusual behavior

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
DataLife
Posts: 447
Joined: 29 Sep 2013, 19:52

INetwork.GetName() unusual behavior

19 Jan 2018, 09:46

I have a very unusual issue with retrieving the network name.

With the code below I am monitoring the network name (windstream) which is the name of my wireless network.
It returns windstream until I open Devices and Printers and click Add Printer. While scanning for a new printer the network name changes to DIRECT-EIDESKTOP-V3D3LUJPHRW

I have no idea what (DIRECT-EIDESKTOP-V3D3LUJPHRW) is. DESKTOP-V3D3LUJ is my computer name.

This only happens on my PC running windows 10. I tried it on 2 other computers running windows 10 with no issues.

Why would scanning for a new printer cause the network name to change? Once the Add Printer dialog window is closed this script detects windstream again.

Code: Select all

loop
 {
  for INetwork in ComObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}").GetNetworks(1)
   try ActiveNetwork := INetwork.GetName()
  if ActiveNetwork <> windstream
   MsgBox %activenetwork%
  sleep 1000  
}

escape::
exitapp
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
User avatar
DataLife
Posts: 447
Joined: 29 Sep 2013, 19:52

Re: INetwork.GetName() unusual behavior

01 Feb 2018, 08:59

Bump!
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 280 guests