Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/130.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ PowerShell错误R6016_C++_Windows_Powershell - Fatal编程技术网

C++ PowerShell错误R6016

C++ PowerShell错误R6016,c++,windows,powershell,C++,Windows,Powershell,我目前正在创建一个powershell脚本,专门为我的工作安装一些软件 该脚本将调用一个cmd,该cmd调用将安装(或卸载)该软件的ps1 但是,在使用我的脚本的某些计算机上,它会出现以下错误: Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe R6016 - not enough space for th

我目前正在创建一个powershell脚本,专门为我的工作安装一些软件

该脚本将调用一个cmd,该cmd调用将安装(或卸载)该软件的ps1

但是,在使用我的脚本的某些计算机上,它会出现以下错误:

Microsoft Visual C++ Runtime Library
Runtime Error!

Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

R6016
- not enough space for thread data
在internet上查找此错误时,我发现以下链接:

它说:

生成和关闭应用程序在60分钟左右重复成功 次,则繁殖失败并出现以下错误:R6016-空间不足 对于线程数据

事实上,有时当我尝试使用脚本进行大约60次安装/卸载时,我会遇到这个错误

但我不明白如何应用这个解决方案:Win32s是什么?我怎样才能释放“TLS”

当我生成或退出PowerShell时,有什么我应该做的吗?是因为cmd总是调用ps1吗

编辑:

我终于找到了如何使用cmd中的一行简单代码生成错误:

powershell-noprofile-command“[Environment]::Exit($host.version.major)”

这应该会给我一个“echo%errorlevel%”的PowerShell主要版本(通常为3,4,5),有时会给我一个“255”,并在事件查看器系统中插入此事件“R6016”


感谢所有能够帮助我解决此问题的人。

脚本到底在做什么?Win32S是一组库,允许一些32位应用程序在16位Windows 3.1上运行。这不是问题的原因。@Sean:的确如此,但这是微软关于这个问题的唯一一篇文章,所以这是我目前唯一的想法:(@MathiasR.Jessen:我添加了一行产生问题的代码。