0

我正在使用Chocolatey安装 Visual Studio 2012 Professional

> cinst visualstudio2012professional

在我的 Chocolatey 日志中,我看到安装成功。

[DEBUG] Running 'Delete-ExistingErrorLog' for VisualStudio2012Professional
[DEBUG] Looking for failure log at 'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\failure.log'
[DEBUG] Found the failure log. Deleting it...
[DEBUG] Running 'Run-ChocolateyPS1' for VisualStudio2012Professional with packageFolder:'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1', action: 'install'
[DEBUG]   __ PowerShell install (chocolateyinstall.ps1) __
[DEBUG]   Looking for chocolateyinstall.ps1 in folder 'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1'. If chocolateyinstall.ps1 is found, it will be run.
[DEBUG] Action file is 'ChocolateyInstall.ps1'
[DEBUG] Running 'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\ChocolateyInstall.ps1'
[DEBUG] Running 'Install-ChocolateyPackage' for VisualStudio2012Professional with url:'http://go.microsoft.com/?linkid=9810233', args: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log' 
[DEBUG] Running 'Get-ChocolateyWebFile' for VisualStudio2012Professional with url:'http://go.microsoft.com/?linkid=9810233', fileFullPath:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe',and url64bit:'http://go.microsoft.com/?linkid=9810233'
[DEBUG] Processor width is 64.
Downloading VisualStudio2012Professional (http://go.microsoft.com/?linkid=9810233) to C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe
[DEBUG] Running 'Get-WebFile' for C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe with url:'http://go.microsoft.com/?linkid=9810233', userAgent: 'chocolatey command line' 
[DEBUG] Setting the UserAgent to 'chocolatey command line'
[DEBUG] Running 'Install-ChocolateyInstallPackage' for VisualStudio2012Professional with file:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe', args: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log' 
Installing VisualStudio2012Professional...
[DEBUG] Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe', statements: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log ' 
Elevating Permissions and running C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe /Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log . This may take awhile, depending on the statements.
[DEBUG] Finishing 'Start-ChocolateyProcessAsAdmin'
VisualStudio2012Professional has been installed.
VisualStudio2012Professional has finished succesfully! The chocolatey gods have answered your request!
[DEBUG] Running 'Get-ChocolateyBins' for C:\chocolatey\lib\VisualStudio2012Professional.11.0.1
[DEBUG]   __ Executable Links (*.exe) __
[DEBUG] Looking for executables in folder: C:\chocolatey\lib\VisualStudio2012Professional.11.0.1
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from ANY command line/powershell prompt.
[DEBUG] There are no executables (that are not ignored) in the package.
[DEBUG] Evaluating NuGet output for line: 
Finished installing 'visualstudio2012professional' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.

但不幸的是,没有安装 Visual Studio。文件夹已创建,但 IDE 不存在。(没有 DevEnv.exe)

devenv.exe 不在我的机器上

是否有与 VS 安装程序关联的日志文件?或许答案就在其中。

4

1 回答 1

0

Hmm, I can't get the download that is used in that package to install, I am running a PS script so I am going to use this which seems to work:

    $testFolder = Join-Path "${Env:ProgramFiles(x86)}" "Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
$alreadyInstalled = (Test-Path $testFolder)
if (!$alreadyInstalled)
{
    Install-ChocolateyPackage 'VisualStudio2012Professional' 'exe' "/Full /Passive /NoRestart /Log $env:temp\vs.log" 'http://download.microsoft.com/download/D/E/8/DE8E42D8-7598-4F4E-93D4-BB011094E2F9/vs_professional.exe'
}
于 2013-09-06T04:46:10.617 回答