Windows Azure - 安装MSI会导致挂断吗?

时间:2012-10-14 15:21:36

标签: asp.net powershell azure

我正在尝试运行安装MSI的Windows Azure启动任务。我试图通过powershell脚本运行任务。当我有以下内容时,我可以确认powershell脚本运行:

"Before powershell" >> C:\hello.txt

$msi = "E:\approot\bin\StartupScripts\AppInitalization_x64.msi"

if($true -eq [System.IO.File]::Exists($msi))
{
   "file exists" >> C:\hello.txt
}
else
{
  "file does not exist" >> C:\hello.txt
}

"After powershell" >> C:\hello.txt

如果我运行部署,我的hello.txt包含“之前,文件存在”和“之后”。

但是,如果我尝试将文件存在的条件更改为:

  $arguments= ' /qn /l*v C:\AppInitalization_x64.txt' 
  Start-Process `
     -file  $msi `
     -arg $arguments `
     -passthru

部署挂起(我让它等待长达五个小时)。 如果我远程进入机器并尝试使用相同的PowerShell片段,它安装就好了。

当我将其作为启动脚本的一部分时,有什么想法会挂起来吗?

1 个答案:

答案 0 :(得分:0)

您是否查看了AppInitialization_x64.txt以查看Windows Installer程序包的挂起位置?这应该给你一个很好的指示,因为你已经启用了详细的日志记录。

相关问题