Fix major bugs in windows plugins check_load and check_service

fixes #7881 #7992