diff -r 488ccbee6ee6 Lib/test/script_helper.py --- a/Lib/test/script_helper.py Thu Feb 13 10:54:32 2014 +0100 +++ b/Lib/test/script_helper.py Thu Feb 13 11:26:29 2014 +0100 @@ -36,6 +36,11 @@ def _assert_python(expected_success, *ar # caller is responsible to pass the full environment. if env_vars.pop('__cleanenv', None): env = {} + if os.name == 'nt': + # Issue #20614: On Windows, CryptAcquireContext() fails with error + # 0x80090006 if the SYSTEMROOT environment variable is missing, + # probably because some DLL cannot be loaded. + env['SYSTEMROOT'] = os.environ['SYSTEMROOT'] env.update(env_vars) cmd_line.extend(args) p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,