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 !!!
Shell1.Execute (“Taskkill /IM /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.

La boite de message est vide !

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

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.