(Edit 4:) The problem disappeared after I did what is described in Edit #3, below. The question that remains is: Why did this problem occur and what fixed it?
Environment: Windows 11.
When I attempt to run IPconfig, I get the error message:
IPCONFIG.EXE - Entry Point Not Found
The procedure entry point RtlConvertUiListToApiList could not be located in the dynamic link library C:\Users\<folder>\WINDOWS\SYSTEM32\NETAPl32.dll.
The folder where it's looking is a place where I archived a previous state of the Windows folder. That archive folder exists only for historical reference and has never (that I know of) been used to run anything. I don't know how or why Windows has decided to look there for any DLLs. That archive was made in 2017, and I'm sure I've run IPconfig a number of times since then without issue.
I checked the actual Windows\System32 folder, and it does have the file netapi32.dll.
I rebooted the computer earlier today in part of the troubleshooting of the problem described in the background of the problem, below. So I doubt rebooting again will help.
(Edit 1:) A comment from Frank Thomas asked me what my path parameter is. A good question; I should have checked that before. To check it, I opened Command Prompt and ran echo %path%, with the result:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\PowerShell\7\;C:\Users\<User>\AppData\Local\Microsoft\WindowsApps;;C:\Users\<User>\AppData\Local\Programs\Microsoft\VS Code\bin
No archive folder there.
(Edit 2:) A comment from harrymc asked me to run where IPconfig. Again, doing that in Command Prompt, the result:
C:\Windows\System32\ipconfig.exe
What could be causing Windows to look in the wrong place for its DLLs, and how can I get it to look in the right place?
Edit 3: A second comment by harrymc asked two things.
The second was to check the file size and timestamp of ipconfig.exe. My size is the same 56 kb. My timestamp is slightly different from his, 2023 11 15 00:51.
The first was to run IPconfig in its folder. This was interesting because it meant running it in Command Prompt. I wasn't doing that before, but was running it in Windows Start, i.e., in the text box at the top of the box that comes up when I press the Windows key. So, without first running cd, I just ran IPconfig in Command Prompt, and guess what? It worked.
Then, to reproduce the original problem, I pressed the Windows key and ran IPconfig there again. Now, I no longer get the previous error. Instead, a black window flashes on the display and quickly disappears. I know that was a Command Prompt window running IPconfig and then closing when finished.
So IPconfig is now running properly. The question I'm left with is why did trying to run it from Start previously cause it to look for DLLs in the wrong place, and how did something I did in responding to those comments fix that?
In any case, I now have the IPv4 address and can continue the printer troubleshooting. Thank you to Frank Thomas and harrymc for getting me to check things that seem to have mysteriously solved the problem.
Edit 5: A third comment by harrymc suggested running DISM and SFC. He suggested running them in the modes that fix errors, but instead, I ran them in the modes that check for errors first:
DISM /Online /Cleanup-Image /ScanHealth- Reported "No component store corruption detected."
DISM /Online /Cleanup-Image /CheckHealth- Reported "No component store corruption detected."
SFC /VerifyOnly
So these tests did not find any corruption that could have caused Windows to look for those DLLs in the wrong place.
Edit 6: Daniel B commented that the DLL search order is much more than just %path% and linked to a reference about that. That is interesting, especially finding out that %path% is dead last in the list of DLL search locations. However, I don't see any clue there as to why Windows tried to run that DLL in an old archive folder.
Background of this problem:
I switched ISPs and am using the WiFi from the new ISP's router. I have connected two devices to the WiFi: my computer and printer. Both devices report being connected to the SSID and the Internet connection on the computer is working just fine for websites and e-mail. Now I'm following the printer's instructions (which I've used before successfully) for connecting the computer to it via WiFi. At the step in those instructions that says, "Search the network for devices and choose from a list of discovered devices", I get the error message, "No device could be found over the network". I Googled that message and got a troubleshooting page from the printer manufacturer. It tells me first to print a page of the printer's network configuration and check that it has a valid IP address, which it does. Next, it tells me to run IPconfig on the computer and check its IP address. That's when I get the problem described above.
where IPCONFIGshow ? – harrymc Jan 06 '24 at 09:19cd C:\Windows\System32andipconfig. (2) MyC:\Windows\System32\ipconfig.exehas size 56KB and dates from16/11/2023 15:09, is yours the same (Windows 11)? – harrymc Jan 06 '24 at 09:43%PATH%is but a tiny part of it. You can learn more about it in this Microsoft article. – Daniel B Jan 06 '24 at 11:18netapi32.dllis present in the correct location. The problem was that windows wasn't looking there. But it is looking there now. – NewSites Jan 07 '24 at 00:39DISMandSFC, but differently than how you suggested. Please see edit #5 and say if you disagree with how I did it and my conclusion from it. – NewSites Jan 07 '24 at 19:49dismandsfccommands you ran will not resolve your issue, whereas 1 - 6 will – JW0914 Jan 07 '24 at 21:19