Using
AutoIt, you could script an executable which accomplishes this. You could make two executables potentially, one to disable keyboard and mouse, then one to enable them. In your software package, first call the disabling script, then call the software installation, then call the enabling script. If your package reboots automatically, you don't need to call the enabling script.
The only issue is if the package somehow fails during the installation and the enabling script doesn't run, your users could be stuck at an error with no way to click or address it.