[Question]: Windows Networks Prompt
Is your question not already answered in the FAQ?
- [X] I made sure the question is not listed in the FAQ.
Is this a general question and not a technical issue?
- [X] I am sure my question is not about a technical issue.
Question
I have installed Windows 10 in a Docker container using this image. I connect to my Windows VM via Remmina. However, every time I launch Windows, this Networks always prompt and the name continues to go up by 1.
Any way I can disable this? It's not so much of an issue, but I just find it annoying.
Thanks.
https://superuser.com/questions/1214281/how-to-hide-or-disable-allow-pc-to-be-discoverable-on-this-network
This workaround unfortunately will likely only mask the problem as it does not solve the potential for hundreds of NIC & network junk entries being added over time to the registry. To me this needs a more elegant solution.
Any update for this?
If using a macvlan there is no issue, I've fiddled about with this and not got far too far, but I suspect the solution will involve stepping away from the default bridge in docker and assinging a set mac address to a manually created bridge. It's a bit annoying !
Actually, this issue is still there even if using macvlan. BTW, my OS is win server 2012.
The network number is unlimited, right?
I've come up with a fairly reasonable workaround for any network:
-
Stop the annoying prompt by adding this key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff]
-
Set the below powershell script to run as a task at boot to keep the network profiles tidy (you will need to adapt it if you have multiple virutal NICs. It will remove any unused profiles and set the current network adatper name to "WinApps" or whatever else you might like
# Get the current network profile name
$currentProfile = (Get-NetConnectionProfile).Name
# Get all profiles from the registry
$profilesKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles"
$profiles = Get-ChildItem -Path $profilesKey
foreach ($profile in $profiles) {
$profilePath = "$profilesKey\$($profile.PSChildName)"
$profileName = (Get-ItemProperty -Path $profilePath).ProfileName
# Remove profiles that don't match the current one
if ($profileName -ne $currentProfile) {
Remove-Item -Path $profilePath -Recurse
Write-Host "Deleted profile: $profileName"
}
}
# Change the current profile name to "WinApps"
$profiles = Get-ChildItem -Path $profilesKey
foreach ($profile in $profiles) {
$profilePath = "$profilesKey\$($profile.PSChildName)"
$profileName = (Get-ItemProperty -Path $profilePath).ProfileName
if ($profileName -eq $currentProfile) {
# Update the profile name
Set-ItemProperty -Path $profilePath -Name "ProfileName" -Value "WinApps"
Write-Host "Renamed profile to: WinApps"
}
}
Can anyone who experiences this issue confirm wether the MAC address of the network adapter stays the same when the number goes up? Because it should not change. And if the PCI slot for the adaptor stays the same? I can only fix this if I know what changes
Can anyone who experiences this issue confirm wether the MAC address of the network adapter stays the same when the number goes up? Because it should not change. And if the PCI slot for the adaptor stays the same? I can only fix this if I know what changes
Yes, the MAC address stays same when the number goes up...
Okay, then it must be something else that changes. Maybe the PCI bus or something like that.
I have this problem with both Windows 10 and Windows 11. The only difference is that Windows 11 seems to suppress the message by default.
The PCI bus location doesn't seem to change either.
The only thing that changes in the network profiles (apart from the name) is a value labelled "DefaultGatewayMac" which exists in a different registry location to that referenced in itelligent's script. The locations are linked by a common "ProfileGuid" value.
Below is a sample of the entire registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged\010103000F0000F0080000000F0000F03A188AA27D7177C2DD99519D3D8319B23615008340D4DFDA5F16DACC9B3EF1A9]
"ProfileGuid"="{4D3697E5-D5E6-4957-88C8-944F18316D66}"
"Description"="Network 13"
"Source"=dword:00000008
"DnsSuffix"="
So what we appear to have is the MAC address of the gateway changing although all the IP addresses (machine, gateway and DNS etc.) all stay the same. Presumably Windows is noticing the gateway mac address changing and is assuming the machine has changed networks. It's a reasonable assumption I guess.
It's probably worth mentioning that I am doing a manual install using a custom iso. It might be worth asking whether others are doing something similar.
Hope this helps. In the meantime I am going to work around the problem using my own adaptation of itelligent's script.
Many thanks for this project. It really is excellent work.
@JOH451 Thank you so much for your research. Since you discovered it was related to the random gateway MAC, I managed to fix the issue by setting the MAC to a static value: https://github.com/qemus/qemu-docker/pull/650/files
So the problem will be solved in the next version, and the script is not necessary anymore.
This is now fixed in v4.13. After launching that version it will detect a new network one more time, and after that it will always keep the same network.