Fix Error 0x80004oo5 on Windows 10 and 11

Harsh Clif

Fix Error 0x80004oo5 on Windows 10 and 11