Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions files/windows_base/install_net48.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$location = "c:\install"
Set-Location $location

$client = new-object System.Net.WebClient

if (!(Test-Path (Join-Path $location "ndp48-x86-x64-allos-enu.exe")))
{
"Downloading .net48"
$net4Url = "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe"
$client.DownloadFile( $net4Url, (Join-Path $location "ndp48-x86-x64-allos-enu.exe") )
$net4Log = Join-Path $location "ndp48-x86-x64-allos-enu.log"
"Installing .net4"
Start-Process ndp48-x86-x64-allos-enu.exe ("/q /log " + $net4Log) -wait
}

new-item C:\install\ndp48-x86-x64-allos-enu.txt -itemtype file
14 changes: 7 additions & 7 deletions manifests/windows_base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,17 @@
require => Exec['set-chocolatey-path'],
}

if versioncmp($::kernelmajversion, '6.1') == 0 {
# Install .net40
file { 'c:/install/install_net40.ps1':
if versioncmp($::kernelmajversion, '6.1') >= 0 {
# Install .net48
file { 'c:/install/install_net48.ps1':
ensure => 'file',
source => 'puppet:///modules/atomia/windows_base/install_net40.ps1',
source => 'puppet:///modules/atomia/windows_base/install_net48.ps1',
}

exec { 'Install-NET40':
command => 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy remotesigned -file C:\install\install_net40.ps1',
creates => 'C:\install\installed_net40.txt',
require => File['c:/install/install_net40.ps1'],
command => 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy remotesigned -file C:\install\install_net48.ps1',
creates => 'C:\install\installed_net48.txt',
require => File['c:/install/install_net48.ps1'],
}
}

Expand Down