VirtualBox

Changeset 54182 in vbox


Ignore:
Timestamp:
Feb 12, 2015 6:52:26 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98238
Message:

Validation Kit: network cleanup script now detects "uninstalled" connections buildup and removes these connections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/win-vbox-net-uninstall.ps1

    r53624 r54182  
    199199    }
    200200
     201# Clean up uninstalled connections
     202if ( (Get-ChildItem "HKLM\SYSTEM\CurrentControlSet\Control\Network\Uninstalled" | Measure-Object).Count -gt 10 ) {
     203   $result = AskForConfirmation "Delete Uninstalled Network Connection Registry Keys" `
     204          "There are over 10 uninstalled network connections accumulated in the registry. Do you want to delete them?" `
     205          "Deletes uninstalled connection keys from the registry." `
     206          "No modifications to the registry will be made."
     207
     208   switch ($result)
     209       {
     210           0 {Remove-Item -Path "HKLM\SYSTEM\CurrentControlSet\Control\Network\Uninstalled\*" -Recurse}
     211           1 {"Removal cancelled."}
     212       }
     213} else {
     214   Write-Host "Less than 10 uninstalled connections -- no action yet required."
     215}
     216
    201217Pop-Location
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette