When you "Shell" a set command it operates in that shell environment which is automatically closed (thus destroyed) after the KiXtart shell is completed.

As Bryce mentioned, you should use the native KiX Set commands.