Another way is to temporarily virtualize your real operating system so any changes made to it are discarded after a reboot. One is to use virtual machine software like VirtualBox which runs programs in a virtual operating system. There are several ways of sandboxing a program.
A sandbox simply means a way of running a program in an environment which separates it from the host operating system.