Skip to content
This repository has been archived by the owner. It is now read-only.

[Enhancement] Install .NET Framework 4.0 Requirement #255

Closed
jamesmanning opened this issue Mar 10, 2013 · 6 comments
Closed

[Enhancement] Install .NET Framework 4.0 Requirement #255

jamesmanning opened this issue Mar 10, 2013 · 6 comments

Comments

@jamesmanning
Copy link
Contributor

@jamesmanning jamesmanning commented Mar 10, 2013

(clearly low priority, just a small user experience issue)

Currently it will let me install chocolatey on a fresh Win7 without any warnings that .NET Framework 4 isn't installed, and when I first run it, it just gives the error that NuGet failed to run and to check that .NET Framework 4 is installed.

It seems like this could be made a little more user-friendly, even if it can't automate the install of .NET Framework 4 (which it seems like it could), it could check whether it's installed and at least open a web page or give a url for the user to do so?

Code to see which framework versions are installed, for instance:

http://msdn.microsoft.com/en-us/library/hh925568.aspx

@pbolduc

This comment has been minimized.

Copy link

@pbolduc pbolduc commented Mar 15, 2013

I was trying to deal with this as well. I have a clean Windows Server 2008 R2 machine. I found something similar to this on the Chocolatey site. It is called right after installing Chocolatey. I downloads the command line version of Web Platform Installer to a temporary directory. It not perfect yet.

$is64bit = (Get-WmiObject Win32_Processor).AddressWidth -eq 64
if($is64bit) {$fx="framework64"} else {$fx="framework"}
$scriptPath = (Split-Path -parent $MyInvocation.MyCommand.path)
if(!(test-path "$env:windir\Microsoft.Net\$fx\v4.0.30319")) {
    Import-Module $env:systemdrive\chocolatey\chocolateyinstall\helpers\chocolateyInstaller.psm1
    $chocTempDir = Join-Path $env:TEMP "chocolatey"
    $tempDir = Join-Path $chocTempDir "webpicmdline"
    Install-ChocolateyZipPackage 'webcmd' 'http://www.iis.net/community/files/webpi/webpicmdline_anycpu.zip'     $tempDir
    .$tempDir\WebpiCmdLine.exe /products: NetFramework4 /accepteula
}
@mwrock

This comment has been minimized.

Copy link
Contributor

@mwrock mwrock commented Mar 15, 2013

This has been on my list to add. Now that I have boxstarter.org wrapped up I hope to knock this out soon. In the mean time, you might consider trying boxstarter, it does just this and with unattended install/reboot resiliency through out all choco installs, it makes installing from bare OS less error prone especially if you include windows updates (which boxstarter can grab).

@pbolduc

This comment has been minimized.

Copy link

@pbolduc pbolduc commented Mar 15, 2013

I will be checking out BoxStarter this weekend. Thanks!

@mwrock

This comment has been minimized.

Copy link
Contributor

@mwrock mwrock commented Mar 19, 2013

tested on clean windows 7 VM in non admin CMD and works perfectly.

@ferventcoder

This comment has been minimized.

Copy link
Contributor

@ferventcoder ferventcoder commented Mar 19, 2013

Thanks Matt, I'll get this over to .org as well.

@ferventcoder

This comment has been minimized.

Copy link
Contributor

@ferventcoder ferventcoder commented Apr 3, 2014

Currently improving this a bit.

ferventcoder added a commit to ferventcoder/chocolatey that referenced this issue Apr 3, 2014
@ferventcoder ferventcoder self-assigned this Apr 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.