It is some version issue on Windows 10. You should carefully read about the used functions to find the differences like on stackoverflow discussed
. Maybe you need to debug it or write a log file.
Tip: run your code in admin mode on W10 to check for some security policy change.