W4RH4WK / Debloat-Windows-10

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps
Other
6.02k stars 853 forks source link

Cannot disable SearchUI without taking ownership of the directory #142

Open dmbekker opened 6 years ago

dmbekker commented 6 years ago

PS C:\Users\David\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master> .\utils\disable-searchUI.bat

C:\Users\David\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master>taskkill /F /IM SearchUI.exe SUCCESS: The process "SearchUI.exe" with PID 6412 has been terminated.

C:\Users\David\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master>move "C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.bak" The process cannot access the file because it is being used by another process. 0 dir(s) moved.

While running disable-searchUI.bat this error comes up. Script is running in an elevated powershell prompt.

If I use SysInternals Processexplorer it shows that SearchUI.exe is using the directory. Windows seems to restart the process before it can rename the directory. However, taking ownership of the directory seems to resolve the issues(or just shear luck..). The directory is now successfully moved.

This should be mentioned, or the script should try to take ownership. Ownership was taking manually by right-clicking the Cortana folder in Windows Explorer -> Properties - > Security -> Advanced Permissions.

adicondrache commented 5 years ago

Thanks