|
41 | 41 | }
|
42 | 42 |
|
43 | 43 | try {
|
44 |
| - Enable-WindowsOptionalFeature -Online -FeatureName "Client-ProjFS" -NoRestart |
| 44 | + Enable-WindowsOptionalFeature -Online -FeatureName "Client-ProjFS" -NoRestart | Out-Null |
45 | 45 | Write-Host "Successfully enabled Projected File System." -ForegroundColor Green
|
46 | 46 | return
|
47 | 47 | }
|
|
54 | 54 | function New-ScheduledTask {
|
55 | 55 | Write-Host "Creating Windows Fake File System Token scheduled task..." -ForegroundColor Yellow
|
56 | 56 |
|
57 |
| - $scriptsDir = "$env:USERPROFILE\Scripts" |
58 |
| - if (-not (Test-Path $scriptsDir)) { |
59 |
| - New-Item -ItemType Directory -Path $scriptsDir |
60 |
| - } |
61 |
| -
|
62 | 57 | if ((Test-Path -Path $RootPath -PathType Container) -and
|
63 | 58 | ($null -ne (Get-ChildItem -Path $RootPath -Force))) {
|
64 | 59 | Write-Host "Warning: Target folder '$RootPath' is not empty. Deployment cancelled." -ForegroundColor Red
|
65 | 60 | exit
|
66 | 61 | }
|
67 | 62 |
|
| 63 | + $scriptsDir = "$env:USERPROFILE\Scripts" |
| 64 | + if (-not (Test-Path $scriptsDir)) { |
| 65 | + New-Item -ItemType Directory -Path $scriptsDir | Out-Null |
| 66 | + } |
| 67 | +
|
68 | 68 | try {
|
69 | 69 | $processScript = @'
|
70 | 70 | function Invoke-WindowsFakeFileSystem {
|
@@ -841,7 +841,7 @@ class FileEntry
|
841 | 841 | $xmlPath = "$env:TEMP\task.xml"
|
842 | 842 | $taskXml | Out-File -FilePath $xmlPath -Encoding Unicode
|
843 | 843 |
|
844 |
| - schtasks /create /tn $TaskName /xml $xmlPath /f |
| 844 | + schtasks /create /tn $TaskName /xml $xmlPath /f | Out-Null |
845 | 845 |
|
846 | 846 | if ($LastExitCode -eq 0) {
|
847 | 847 | Write-Host "Successfully deployed Windows Fake File System Token" -ForegroundColor Green
|
@@ -921,7 +921,7 @@ class FileEntry
|
921 | 921 | }
|
922 | 922 |
|
923 | 923 | Invoke-Step "Removing Projected File System feature" {
|
924 |
| - Disable-WindowsOptionalFeature -Online -FeatureName "Client-ProjFS" -NoRestart |
| 924 | + Disable-WindowsOptionalFeature -Online -FeatureName "Client-ProjFS" -NoRestart | Out-Null |
925 | 925 | }
|
926 | 926 |
|
927 | 927 | Invoke-Step "Removing folder" {
|
|
0 commit comments