<commit_before>. $PSScriptRoot\Externals\PinnedApplications.ps1
. $PSScriptRoot\Externals\VsixInstallFunctions.ps1

function Invoke-BoxStarter{
    param(
      [string]$bootstrapPackage="default"
    )
    try{Start-Transcript -path $env:temp\boxstrter.log -Append}catch{$BoxStarterIsNotTranscribing=$true}
    Stop-Service -Name wuauserv

    $localRepo = "$PSScriptRoot\BuildPackages"
    if( Test-Path "$localRepo\$bootstrapPackage") {
        .$localRepo\$bootstrapPackage\boxstarterInstall.ps1
    }
    else {
        cinst all -source http://www.myget.org/F/$bootstrapPackage/
    }

    if($global:InstallWindowsUpdateWhenDone){Install-WindowsUpdate $global:GetUpdatesFromMSWhenDone}
    Start-Service -Name wuauserv
    if(!$BoxStarterIsNotTranscribing){Stop-Transcript}
}

function Is64Bit {  [IntPtr]::Size -eq 8  }
function Download-File([string] $url, [string] $path) {
    Write-Output "Downloading $url to $path"
    $downloader = new-object System.Net.WebClient
    $downloader.DownloadFile($url, $path) 
}
function Install-VS11-Beta {
    Install-ChocolateyPackage 'vs' 'exe' '/Passive /NoRestart /Full' 'http://go.microsoft.com/fwlink/?linkid=237587' 
}
function Disable-UAC {
    Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA  -Value 0
}
function Add-ExplorerMenuItem([string]$name, [string]$label, [string]$command, [string]$type = "file"){
    if( -not (Test-Path -path HKCR:) ) {
        New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root
    }
    if($type -eq "file") {$key = "*"} elseif($type -eq "directory") {$key="directory"} else{ return }
    if(!(test-path -LiteralPath "HKCR:\$key\shell\$name")) { new-item -Path "HKCR:\$key\shell\$name" }
    Set-ItemProperty -LiteralPath "HKCR:\$key\shell\$name" -Name "(Default)"  -Value "$label"
    if(!(test-path -LiteralPath "HKCR:\$key\shell\$name\command")) { new-item -Path "HKCR:\$key\shell\$name\command" }
    Set-ItemProperty -LiteralPath "HKCR:\$key\shell\$name\command" -Name "(Default)"  -Value "$command `"%1`""
}
function cinst {
    Check-Chocolatey
    $chocolatey="$env:systemdrive\chocolatey\chocolateyinstall\chocolatey.cmd"
    .$chocolatey install $args
}
function Install-FromChocolatey {<commit_msg>removed vs install since now there is a chocolatey package for that<commit_after>. $PSScriptRoot\Externals\PinnedApplications.ps1
. $PSScriptRoot\Externals\VsixInstallFunctions.ps1

function Invoke-BoxStarter{
    param(
      [string]$bootstrapPackage="default"
    )
    try{Start-Transcript -path $env:temp\boxstrter.log -Append}catch{$BoxStarterIsNotTranscribing=$true}
    Stop-Service -Name wuauserv

    $localRepo = "$PSScriptRoot\BuildPackages"
    if( Test-Path "$localRepo\$bootstrapPackage") {
        .$localRepo\$bootstrapPackage\boxstarterInstall.ps1
    }
    else {
        cinst all -source http://www.myget.org/F/$bootstrapPackage/
    }

    if($global:InstallWindowsUpdateWhenDone){Install-WindowsUpdate $global:GetUpdatesFromMSWhenDone}
    Start-Service -Name wuauserv
    if(!$BoxStarterIsNotTranscribing){Stop-Transcript}
}

function Is64Bit {  [IntPtr]::Size -eq 8  }
function Download-File([string] $url, [string] $path) {
    Write-Output "Downloading $url to $path"
    $downloader = new-object System.Net.WebClient
    $downloader.DownloadFile($url, $path) 
}
function Disable-UAC {
    Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA  -Value 0
}
function Add-ExplorerMenuItem([string]$name, [string]$label, [string]$command, [string]$type = "file"){
    if( -not (Test-Path -path HKCR:) ) {
        New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root
    }
    if($type -eq "file") {$key = "*"} elseif($type -eq "directory") {$key="directory"} else{ return }
    if(!(test-path -LiteralPath "HKCR:\$key\shell\$name")) { new-item -Path "HKCR:\$key\shell\$name" }
    Set-ItemProperty -LiteralPath "HKCR:\$key\shell\$name" -Name "(Default)"  -Value "$label"
    if(!(test-path -LiteralPath "HKCR:\$key\shell\$name\command")) { new-item -Path "HKCR:\$key\shell\$name\command" }
    Set-ItemProperty -LiteralPath "HKCR:\$key\shell\$name\command" -Name "(Default)"  -Value "$command `"%1`""
}
function cinst {
    Check-Chocolatey
    $chocolatey="$env:systemdrive\chocolatey\chocolateyinstall\chocolatey.cmd"
    .$chocolatey install $args
}
function Install-FromChocolatey {
{'fraction_non_alphanumeric': 0.15154244539518127, 'fraction_numerical': 0.005404188245890566, 'mean_word_length': 4.238207547169812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2076742', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1465, 'n_words': 268}