I figured out how the PortableApps work. And now I can create PortableApps that save ini files in the Windows directory or save settings in Windows registry. Basically, PortableApps save the the host PC's settings before starting any PortableApps, and set its own settings. Upon termination of the PortableApps, the host;s PC's settings are restored.
My reservation is, if the PortableApps fail, the host PC's settings may not be restored (I think).
I can now create PortableApps for myself. I have done it for my favourite computer games. They needed a little tweaking, because some of them can only be started in its installation directory.