Jump to content

---


playlet
 Share

Recommended Posts

Do you have "Local Area Connection" in Network Connections? It only works with the exact title: "Local Area Connection".

Yes, that is what it's called.

I tried to fix it myself. I inserted a line into 'Func LAN_Check' (last line is mine):

Func LAN_Check($oLanConnection = "Local Area Connection", $strFolderName = "Network Connections")
    $ShellApp = ObjCreate("Shell.Application")
    $oControlPanel = $ShellApp.Namespace(3)
    $oNetConnections = ""
    For $FolderItem In $oControlPanel.Items
        $var &= @CRLF & $FolderItem.Name

After that For loop, here is the contents of $var:

Power Options
Notification Area Icons
Taskbar and Start Menu
Credential Manager
Default Programs
RemoteApp and Desktop Connections
Windows Update
Desktop Gadgets
Windows Firewall
Phone and Modem
Java
Speech Recognition
User Accounts
Region and Language
HomeGroup
Mouse
Folder Options
Keyboard
Device Manager
Windows CardSpace
Performance Information and Tools
Programs and Features
Indexing Options
Network and Sharing Center
Parental Controls
AutoPlay
Sync Center
Recovery
Internet Options
Devices and Printers
Color Management
Backup and Restore
System
Action Center
Fonts
Display
Troubleshooting
Getting Started
Administrative Tools
Ease of Access Center
Windows Defender
IFS Drives Control Panel Item
BitLocker Drive Encryption
Date and Time
Location and Other Sensors
Personalization
Sound
Realtek HD Audio Manager
Directory Opus Prefs
Directory Opus Customize
QuickTime (32-bit)

Since there is no "Network Connections" in the list I changed the first line of Func LAN_Check to:

Func LAN_Check($oLanConnection = "Local Area Connection", $strFolderName = "Network and Sharing Center")
.

Still get the error, and

$oNetConnections.Items.Count

after that For loop returns "0" (zero).

I only have small experience with ObjCreate (have a little experience with Visual Basic .NET from a couple years ago).

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...