Fix Robocopy Not Copying for Users who have a Space in their name (#1851)

This was pointed out in https://github.com/ChrisTitusTech/winutil/issues/1848 issue
This commit is contained in:
Mr.k
2024-04-20 18:15:56 +03:00
committed by GitHub
parent 272e4d1d39
commit c3e447d289

View File

@ -2325,7 +2325,7 @@
taskkill.exe /F /IM \"explorer.exe\"
Write-Host \"Copy all OneDrive to Root UserProfile\"
Start-Process -FilePath robocopy -ArgumentList \"$env:USERPROFILE\\OneDrive $env:USERPROFILE /e /xj\" -NoNewWindow -Wait
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($env:USERPROFILE.TrimEnd())\\OneDrive' '$($env:USERPROFILE.TrimEnd())\\' /e /xj\" -NoNewWindow -Wait
Write-Host \"Remove OneDrive\"
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --force --silent Microsoft.OneDrive \" -NoNewWindow -Wait