<commit_before>function Get-VirtualBoxIntallLocation() {
    Update-SessionEnvironment

    Write-Verbose 'Checking VBOX_MSI_INSTALL_PATH'
    if ( $installLocation = $Env:VBOX_MSI_INSTALL_PATH ) {
        if (Test-Path $installLocation) { return }
    }

    Write-Verbose 'Checking Get-AppInstallLocation'
    if ( $installLocation = Get-AppInstallLocation 'virtualbox') { return }
}

#http://stackoverflow.com/questions/40863475/starting-non-elevated-prompt-from-elevated-session
function Start-ProcessNonElevated( [string] $Cmd, [switch]$UsePowerShell ) {
    $svc = gsv Schedule -ea 0
    if ($svc -and $svc.Status -ne 'Running') { throw 'Start-ProcessNonElevated requires running Task Scheduler service' }

    $res = @{}

    $tmp_base  = [System.IO.Path]::GetTempFileName()
    $tmp_base  = $tmp_base -replace '\.tmp$'
    $tmp_name  = Split-Path $tmp_base -Leaf
    $task_name = "Start-ProcessNonElevated-$tmp_name"
    Write-Verbose "Temporary files: $tmp_base"

    if ($UsePowershell) {
        @(
            '$r = "{0}"' -f $tmp_base
            ". {{`n{0}`n}} >`"`$r.out.log`" 2>`"`$r.err.log`"" -f $Cmd
        ) -join "`n" | Out-String | Out-File "$tmp_base.ps1"
        $cmd = "powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -NoLogo -NonInteractive -File '$tmp_base.ps1'"
    }<commit_msg>(virtualbox) bugfix return installlocation<commit_after>function Get-VirtualBoxIntallLocation() {
    Update-SessionEnvironment

    Write-Verbose 'Checking VBOX_MSI_INSTALL_PATH'
    if ( $installLocation = $Env:VBOX_MSI_INSTALL_PATH ) {
        if (Test-Path $installLocation) { return $installLocation }
    }

    Write-Verbose 'Checking Get-AppInstallLocation'
    if ( $installLocation = Get-AppInstallLocation 'virtualbox') { return $installLocation }
}

#http://stackoverflow.com/questions/40863475/starting-non-elevated-prompt-from-elevated-session
function Start-ProcessNonElevated( [string] $Cmd, [switch]$UsePowerShell ) {
    $svc = gsv Schedule -ea 0
    if ($svc -and $svc.Status -ne 'Running') { throw 'Start-ProcessNonElevated requires running Task Scheduler service' }

    $res = @{}

    $tmp_base  = [System.IO.Path]::GetTempFileName()
    $tmp_base  = $tmp_base -replace '\.tmp$'
    $tmp_name  = Split-Path $tmp_base -Leaf
    $task_name = "Start-ProcessNonElevated-$tmp_name"
    Write-Verbose "Temporary files: $tmp_base"

    if ($UsePowershell) {
        @(
            '$r = "{0}"' -f $tmp_base
            ". {{`n{0}`n}} >`"`$r.out.log`" 2>`"`$r.err.log`"" -f $Cmd
        ) -join "`n" | Out-String | Out-File "$tmp_base.ps1"
        $cmd = "powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -NoLogo -NonInteractive -File '$tmp_base.ps1'"
    }
{'fraction_non_alphanumeric': 0.14659300184162063, 'fraction_numerical': 0.010313075506445672, 'mean_word_length': 3.4379084967320264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1870152', 'n_tokens_mistral': 978, 'n_tokens_neox': 932, 'n_words': 183}