diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index a640d51..a312c76 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -5692,7 +5692,8 @@ If (Test-Path -Path "$FFUDevelopmentPath\dirty.txt") { Get-FFUEnvironment } WriteLog 'Creating dirty.txt file' -New-Item -Path .\ -Name "dirty.txt" -ItemType "file" | Out-Null +$dirtyFilePath = Join-Path -Path $FFUDevelopmentPath -ChildPath 'dirty.txt' +New-Item -Path $dirtyFilePath -ItemType "file" | Out-Null # Early CLI prompt for additional FFUs (only if enabled and not provided) if ($BuildUSBDrive -and $CopyAdditionalFFUFiles -and ((-not $AdditionalFFUFiles) -or ($AdditionalFFUFiles.Count -eq 0))) { @@ -7615,7 +7616,8 @@ else { } #Clean up dirty.txt file -Remove-Item -Path .\dirty.txt -Force | out-null +$dirtyFilePath = Join-Path -Path $FFUDevelopmentPath -ChildPath 'dirty.txt' +Remove-Item -Path $dirtyFilePath -Force | out-null # Remove per-run session folder if present $sessionDir = Join-Path $FFUDevelopmentPath '.session' if (Test-Path -Path $sessionDir) { diff --git a/FFUDevelopment/BuildFFUVM_UI.ps1 b/FFUDevelopment/BuildFFUVM_UI.ps1 index 6f3b06c..7cf7144 100644 --- a/FFUDevelopment/BuildFFUVM_UI.ps1 +++ b/FFUDevelopment/BuildFFUVM_UI.ps1 @@ -293,9 +293,10 @@ $script:uiState.Controls.btnRun.Add_Click({ ) $startCleanupParams = @{ - FilePath = $pwshPath - ArgumentList = $cleanupArgs - PassThru = $true + FilePath = $pwshPath + ArgumentList = $cleanupArgs + WorkingDirectory = $ffuDevPath + PassThru = $true } if ($Host.Name -eq 'ConsoleHost') { $startCleanupParams['NoNewWindow'] = $true @@ -455,9 +456,10 @@ $script:uiState.Controls.btnRun.Add_Click({ } $startBuildParams = @{ - FilePath = $pwshPath - ArgumentList = $pwshArgs - PassThru = $true + FilePath = $pwshPath + ArgumentList = $pwshArgs + WorkingDirectory = $config.FFUDevelopmentPath + PassThru = $true } if ($Host.Name -eq 'ConsoleHost') { $startBuildParams['NoNewWindow'] = $true