2

我已经为这个问题苦苦挣扎了几天。我尝试用谷歌搜索这个问题,但没有找到任何答案。

我正在尝试使用 powershell 在远程机器(VM)上安装 exe。该应用程序在安装时使用 oracle 和 mysql 检查与数据库的连接。我的 Powershell 脚本将安装文件复制到远程计算机。然后连接到机器并运行exe。它一直工作到检查数据库连接为止。

当我使用远程桌面连接并连接到远程计算机时,我可以运行 exe 并成功检查数据库连接并完成安装。我什至可以使用 powershell 从 VM 连接到我的 Box,并且它安装正确。

我假设它与远程机器权限有关,但我不确定。有谁知道为什么安装程序无法连接以及如何解决这个问题?

机器规格、脚本和例外情况如下。

我的 Box 正在运行Windows 7 Professional SP1 x64

甲骨文版本: 11.2.0

虚拟机正在运行Windows Server 2008 R2 x64

甲骨文版本: 11.2.0

#Copies required install files and file passed in as an argument to remote machine
Copy-Item -Path $source -Destination \\$computer\$destination\Install -Recurse -Force
Copy-Item -Path C:\$argument -Destination \\$computer\$destination -Recurse -Force

#Connect to remote machine
Enter-Pssession $computerIP -credential $cred

#Starts the install
(Start-Process -FilePath C:\Setup.exe -ArgumentList $arguments -Wait -Passthru).ExitCode

日志返回错误代码-2147467259

例外:

在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) 在 Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx,对象 src) 在 Oracle.DataAccess.Client.OracleConnection.Open()*

不返回内部异常。

4

0 回答 0