在登录计算机之前,在新VM上静默安装Visual Studio 2015

时间:2017-05-19 14:02:51

标签: visual-studio visual-studio-2015 silent-installer

尝试在虚拟机上安装Visual Studio 2015时遇到问题。正在自动配置VM,并且在克隆虚拟机后不久,安装将作为脚本的一部分运行。

我的问题是,当我开始安装时,我相信,我没有加载用户个人资料作为我运行安装的用户。用户已添加到本地管理员组,因此访问不是问题。

安装完成,但大约需要4个小时。这是因为它在尝试将日志写入用户临时目录(它不存在)时挂起。我将日志记录设置为机器上存在的文件夹,并且99%的日志都会去那里,但是当运行终极终结器,modernblend终结器和vsgraphics vsga终结器时,它会将日志写入临时目录并且我有无法控制(我能找到)。以下是这些日志的摘录

MSI (s) (74:78) [15:29:37:694]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI5EB8.tmp, Entrypoint: LogCustomAction
MSI (s) (74:74) [15:29:37:694]: Generating random cookie.
MSI (s) (74:74) [15:29:37:694]: Created Custom Action Server with PID 5240 (0x1478).
MSI (s) (74:A4) [15:29:37:709]: Running as a service.
MSI (s) (74:A4) [15:29:37:709]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
05/18/17 15:29:37 DDSet_Status: LANGID: 1033
05/18/17 15:29:37 DDSet_Entry: AppID Logged Custom Action started
05/18/17 15:29:37 DDSet_Status: CustomActionData: E:\Applications\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe;/setup /AllowDuringSetup 
05/18/17 15:29:37 DDSet_Status: Appid Custom Action will log to C:\Users\USJECE2\AppData\Local\Temp\VS1.tmp
05/18/17 15:29:37 DDSet_Status: Launching "E:\Applications\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /setup /AllowDuringSetup  /log "C:\Users\USJECE2\AppData\Local\Temp\VS1.tmp"
MSI (s) (74:88) [16:21:07:403]: Running as a service.
MSI (s) (74:88) [16:21:08:179]: Running as a service.
MSI (s) (74:AC) [16:21:30:551]: Running as a service.
05/18/17 15:29:37 DDSet_Entry: Starting process, will wait for up to 60 minutes to complete...
05/18/17 16:29:37 DDSet_Warning: Unable to open logfile
05/18/17 16:29:37 DDSet_Error: Timeout while waiting on process handle
05/18/17 16:29:37 DDSet_CARetVal: CA_E1B8E5023B1F
MSI (s) (74!60) [16:29:37:722]: Closing MSIHANDLE (92326) of type 790531 for thread 864
05/18/17 16:29:37 DDSet_Exit: AppID Logged Custom Action completed
MSI (s) (74:78) [16:29:37:722]: Closing MSIHANDLE (92325) of type 790536 for thread 5208

这是我在启动流程时运行的命令行

E:\temp\VisualStudio\vs2015_installer\vs2015_installer.exe /adminfile E:\temp\VisualStudio\vs2015_installer\AdminDeployment.xml /quiet /norestart /Log "E:\logs\VS2015.log"

这是管理文件的包自定义部分

<BundleCustomizations TargetDir="E:\Applications\Microsoft Visual Studio 14.0" NoCacheOnlyMode="default" NoWeb="default" NoRefresh="default" SuppressRefreshPrompt="default" Feed="default" />

如果我登录到机器然后注销并运行脚本,这不是一个问题,但是,这些机器是自动配置的,并且在机器成功构建之前没有用户交互,包括静音安装。

谢谢!

1 个答案:

答案 0 :(得分:0)

我终于想到了这一点。即使这有助于世界上的一个人,我也会感到高兴。我离开了这个,刚刚安装了VS 2017.我被要求再次这样做,所以我走了另一条路。我碰巧成功安装了2015年,但那是幸运的。

要安装它,我需要安装ASP.NET 4.0。确保您没有安装3.0,因为它会失败,即使您也安装了4.0。我希望这可以节省其他人的数小时和故障排除时间。