How to restart the macOS Finder after a "defaults write" command

How to restart the finder after a “defaults write” command (ex: )?
I tried unsuccessfully:
Shell1.Execute (“defaults write NSGlobalDomain AppleShowAllExtensions, TRUE”)
Shell1.Execute ("killall Finder”) ← Does not work !!!
or
Shell1.Execute (“Taskkill /IM Findex.app /F”) ??
for info : I have a Mac M1 (Apple Silicon)
Thank you very much

Under the most recent versions of macOS, Catalina and over, it is very possible that finder relaunch is only available from user interaction.

Have you looked at shell1.result ? It may give you some hints into what is going on.

Merci.
La boite de message est vide !

Preformatted text
Shell1.Mode = 2
Shell1.Execute (“killall finder”)
Messagebox(Shell1.Result)

Thanks.
Mesagebox is empty !

That’s not going to work. In that mode, She’ll doesn’t wait for a response. Try setting mode to 0.

3 Likes