从batch file调用Setup.exe崩溃错误0x0000006

我们将在几乎所有的计算机上安装一些新的软件,我正试图设置一个GPO来执行此操作。 我们运行的是Windows Server 2008 R2域控制器,我们所有的机器都是Windows 7。

GPO调用位于我们的文件服务器上的networking共享上的以下脚本。 它自己调用另一个服务器上另一个networking共享上的可执行文件的脚本。 该可执行文件将imediatelly与错误0x0000006崩溃。 事件日志只是说: Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Setup.exe because of this error. Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Setup.exe because of this error.

这是脚本(存储在\\WIN2K8R2-F-01\Remote Applications ):

 @ECHO OFF IF DEFINED ProgramFiles(x86) ( ECHO DEBUG: 64-bit platform SET _path="C:\Program Files (x86)\Canam" ) ELSE ( ECHO DEBUG: 32-bit platform SET _path="C:\Program Files\Canam" ) IF NOT EXIST %_path% ( ECHO DEBUG: Folder does not exist PUSHD \\WIN2K8R2-PSA-01\PSA Data\Client START "" "Setup.exe" "/q" POPD ) ELSE ( ECHO DEBUG: Folder exists ) 

以pipe理员身份手动运行脚本也会导致相同的错误。 设置相同的目标和参数的快捷方式完美的作品。 手动调用可执行文件也可以。

不知道是否重要,但安装程序是基于dotNETInstaller。 我不知道是什么版本。

我将不胜感激任何build议,解决这个问题。 提前致谢!

UPDATE

我非常怀疑这个问题,但脚本托pipe的networking共享是共享驱动器,而networking共享可执行文件的脚本引用是共享文件夹。

此外,这两个共享的Domain Computers列出了对共享和安全选项卡的完全访问权限。 而PUSHD工作原理并不包括引号中的path。

更新2

如果我在客户机上手动打开CMD并inputPUSHD "\\WIN2K8R2-PSA-01\PSA Data\Client"我就可以正确安装目录作为驱动器。 如果我然后inputSTART "" "Setup.exe" "/q"那么安装程序会完全按照它应该进行的操作,它实际上会安装应用程序。

更新3

在通过ECHO语句进行一些debugging时,我开始向客户机上的C:\驱动器输出TXT文件。 我调用PUSHD ECHO ed %CD%来查看当前目录是什么。 它结束了输出C:\Windows没有{?}:\Client应该如果它成功地挂载远程目录。

我认为这与我在屏幕的最顶端得到的消息有关,UNCpath不被支持,等等,尽pipe脚本的其余部分实际执行。

仍然在寻找build议,让这个工作。

build议可能会帮助你。

1)

您可以使用sysinternal的psexec打开一个cmd窗口作为系统debugging“psexec \ 127.0.0.1 / s cmd”从那里你可以通过脚本“逐行”来看看它失败的地方

2)

您可以修改脚本,使其在当前目录中以“%〜dp0”前缀运行

你试过跳过START命令吗?

PUSHD \ WIN2K8R2-PSA-01 \ PSA Data \ Client

%〜dp0Setup.exe“”/ q“

把报价放在共享path周围。 你在共享名称中有一个空格,我认为这是造成这个问题的原因。

听起来像是一个权限问题。 如果你在启动脚本中这样做,它将以SYSTEM身份运行。 您需要授予Domain Computers读取文件存储位置的权限。

问题是你在安装完成之前popup了。 这是因为cmd开始设置并紧跟着popd命令。

 Use start "" Setup.exe /wait /q 

您也可以使用UNCpath。 也许你需要报价。

 start "Setup title" "\\server\share\folder\setup.exe" /q