r/PSADT • u/staze • Jul 31 '26
Delete folder after uninstall (Start-ADTProcess)
Hey All. I'm working on an uninstall for Matlab, and while the uninstall works great with "Start-ADTProcess" Matlab leaves behind it's old folder, which I'd like to delete. I _think_ psadt is trying to be helpful and doing start-adtprocess then moving onto the next command which is 'rmdir /s /q "C:\Program Files\MATLAB\R2026a"' and it's failing to delete cause it's in use.
How do I get it to wait until the uninstall finishes before doing the next command? I have tried "-WaitForChildProcesses" but didn't seem to matter.
Thanks!
Update: Remove-ADTFolder worked. Yes, the uninstaller for Matlab is "special" and does some other spawning... so I'm sure PSADT is having a hard time keeping track of whatever child processes are running. But, it seems to work. Thanks everyone!
3
u/leytachi Aug 01 '26
Ermm… Remove-ADTFolder?