New
#600
these too:
;,=
Code:-replace '[;,=() &^]'
these too:
;,=
Code:-replace '[;,=() &^]'
@einstein1969 Nice Script. I do have a few suggestions:
- add complete path to the directory, so deletion will be possible outside of windowsapps
- get needed permissions and rights to delete the directories.
Would be thanksful for a reply.
sorry for the delay but I was sick and I had a lot to do.
I solved the various problems I will try to update the version as soon as possible
Take your time. There is no rush.
Here is the new version with the path for poisonous characters and I fixed some minor bugs and cosmetic improvements
I have tested only on windows 11
Version 0.1.4 Beta
CleanWA_0.1.4Beta_.zip
- - - Updated - - -
I have added complete path
I haven't gone into the permissions. If you have the solution post it here that I insert it in the script generation.
- - - Updated - - -
Hi Matthew
Put the script into the following folder:
$CleanWA_0.1.4Beta_
Then, it will not work. The following code works with such a folder name.
Code:Set "[-]=%ProgramData%\[-+~+-].cmd" (Fsutil Dirty Query %SystemDrive%>Nul)&&(Del "%[-]%"2>Nul&Goto [Run_it]) Echo @Echo off^&"%~f0">"%[-]%" & PowerShell start "%[-]%" -verb RunAs If not %errorlevel%==0 (Del "%[-]%"&Exit) else (Exit /B) :[Run_it]
I haven't gone into the permissions. If you have the solution post it here that I insert it in the script generation.
Here you have a solutiion for permissions:
takeown /R /F "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_2022.310.2344.0_neutral_~_8wekyb3d8bbwe"
icacls.exe "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_2022.310.2344.0_neutral_~_8wekyb3d8bbwe" /grant JederOI)(CI)(F) /L
Be aware of the Smiley. It should be : ( (no Space)
You have to use the 2 build in commands. Tested in W11. Takeown is you take the ownership of the dir, icacls is for changing the rights for your user to have pemission to delete the directory.
Looking forward to 0.15
For security reasons, you probably shouldn't grant Full Control to Everyone (Jeder is Everyone on German language versions of Windows) for anything that's under%PROGRAMFILES%\WindowsApps
. Instead, you should give this permission to the Administrators group:
To work around the problem of internatialisation, S-1-5-32-544, the security identifier of the Administrators group can be used with an asterisk [*] like shown in the above command.Code:icacls %PROGRAMFILES%\WindowsApps\Microsoft.DesktopAppInstaller_2022.310.2344.0_neutral_~_8wekyb3d8bbwe /grant *S-1-5-32-544:(OI)(CI)F /L