1. The WLAN AutoConfig service is stopped or disabled
What's actually happening here is that Windows can't open the profile because the service that manages wireless profiles isn't running. The error code 0x000004B5 maps to ERROR_CANNOT_OPEN_PROFILE, and in most cases the culprit is WlanSvc — it's the service that reads and writes those XML profiles stored in C:\ProgramData\Microsoft\WlanSvc\Profiles\Interfaces. If that service is dead, any attempt to open or modify a profile fails with this exact error.
You'll see this most often right after a Windows update, or when you've used a third-party “network optimizer” that disabled services to “speed things up.” I've also seen it happen when the service is set to Manual and something in the boot order trips over it.
The fix
- Press Win + R, type
services.msc, hit Enter. - Scroll to WLAN AutoConfig. Double-click it.
- Set Startup type to Automatic (Delayed Start also works, but plain Automatic is fine).
- Click Start if it's not running, then Apply and OK.
Still stuck? The service might be blocked by a policy. Open an elevated Command Prompt and run:
sc config WlanSvc start= auto
sc start WlanSvcThe reason step 3 works is that WlanSvc runs under LocalService, and if the WLAN AutoConfig group in the registry got its permissions mangled, the service won't start. That's rare, but if sc start throws an error, check the Event Viewer for source WLAN-AutoConfig.
2. The stored profile is corrupted or unreadable
If the service is running fine and you still get 0x000004B5 when opening a specific profile, the profile itself is the problem. Windows stores each profile as an XML file, and if that file is truncated, contains invalid characters, or has a mismatched GUID, the system can't parse it.
This usually happens after a failed network migration, a disk cleanup that wrongly deleted profile folders, or when you import a profile from another machine with a different SSID configuration.
The fix — delete and recreate the profile
Open an elevated Command Prompt and list your profiles:
netsh wlan show profilesNote the profile name that's failing. Then delete it:
netsh wlan delete profile name="YourProfileName"After that, reconnect to the network and let Windows build a fresh profile. If you need to keep the settings (like a saved passphrase), export it first via netsh wlan export profile name="...", then delete and re-import after cleaning the file.
What's actually happening here is that the old profile had a reference to an interface GUID that no longer exists — say you swapped a Wi-Fi adapter. The profile points to a dead interface, and the API call fails because it can't map the profile to a live adapter. Deleting and reconnecting forces Windows to write a profile tied to the current interface.
3. Permissions on the profile folder are wrong
Less common but real: the Profiles folder under C:\ProgramData\Microsoft\WlanSvc loses its SYSTEM or Administrators ACL entries. This happens after a botched group policy change or a security software “hardening” pass. When the WlanSvc service tries to read the profile, it gets access denied, which surfaces as 0x000004B5.
You'll know it's a permissions issue if the error only shows up for one user account, or if you can't even run netsh wlan show profiles without an access denied message.
The fix — reset ACLs on the profile store
Open an elevated Command Prompt and run:
icacls "C:\ProgramData\Microsoft\WlanSvc" /reset /t /c /qThen restart the service and test:
net stop WlanSvc && net start WlanSvcThe reason /reset works is that it reverts all ACLs on that folder to the defaults inherited from ProgramData. If a third-party tool explicitly denied something, this clears it. Note that /c continues past errors, and /q suppresses the success messages — you want the output clean so you can spot actual failures.
If icacls reports “Access is denied” on the folder itself, you'll need to take ownership first:
takeown /f "C:\ProgramData\Microsoft\WlanSvc" /r /d y
icacls "C:\ProgramData\Microsoft\WlanSvc" /reset /t /c /qDon't skip the takeown step if you're getting denials — it's not optional, it's the prerequisite.
Quick-reference summary
| Cause | Symptom | Fix |
|---|---|---|
| WLAN AutoConfig stopped | All profiles fail; service shows not running | Set Startup type Automatic, start service, or sc config WlanSvc start= auto |
| Corrupt profile XML | Only one profile fails; others open fine | netsh wlan delete profile name="..." then reconnect |
| Bad ACLs on profile folder | Access denied in netsh; error for all users | icacls "...\\WlanSvc" /reset /t /c /q, then restart service |
Try the service fix first — it's the fastest to test and covers the most ground. If that doesn't do it, nuke the profile. The permissions reset is a last resort because it touches system folders, but it's the only thing that works when something tangled the ACLs.