KSP-ModularManagement / KSPe

Extensions and utilities for Kerbal Space Program
http://ksp.lisias.net/add-ons/KSPAPIExtensions
Other
11 stars 5 forks source link

Replace the need of the Kernel32.dll for Win64 rigs #20

Closed Lisias closed 2 years ago

Lisias commented 2 years ago

Kernel32.dll is, by some reason, being fased out or something by Microsoft - as this thingy is now and then missing from some rigs.

See:

Just deactivate the unreparsing is not viable, as things will start to bork on Windows machines that use symlinks.

Lisias commented 2 years ago

It's not possible.

The only way to "reparse" a path is by using Kernel32.dll's GetFinalPathNameByHandle (link to msdn), this thingy is available only on Kernel32.dll.

So, in essence, it's the user's Windows that it's broken, and it needs to be fixed.

The most straightforward way to do so is to use the commands:

regsvr32 /u kernel32.dll
regsvr32 /i kernel32.dll

source: MS

On a Administrator capable account.

This appears to be related to corrupted device drives being installed. Source

But if by some reason the file Kernel32.dll is missing, it needs to be reinstalled. But downloading it from the Internet is suicidal, you will be backdoor'ed for sure. You need to use Microsoft own tools to do that:

sfc /scannow

and if it complains about something:

DISM /Online /Cleanup-Image /RestoreHealth

Algo, on a Adminsitrator capable account. Detailed instructions on this link.

Lisias commented 2 years ago

Found more information here

This is plaguing Windows since Windows 7.

Lisias commented 2 years ago

Humm… Win32 File Management Functions are needed due the different Namespaces on Windows!

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Lisias commented 2 years ago

For the record, I ranted about the terrible DLL management Microsoft does on a forum port in 2018. :)

https://forum.kerbalspaceprogram.com/index.php?/topic/177133-i-believe-i-solved-my-constant-crashing-of-kerbal-space-program-myself-and-thought-i-would-share/&do=findComment&comment=3424243