Please do not joke, but I will not answer your specific question, however this is a way to restart the PC after installing msi.
Use WiX , it is much more flexible than VS, which is built into the configuration, and there is a plugin for VS.
If you use WiX, this is the code that triggers the reboot.
<InstallExecuteSequence> <ScheduleReboot After='InstallFinalize' /> </InstallExecuteSequence>
Alternatively, you can create a transformation for your VS setup project, which contains only additional entries to initiate a reboot, then at any time when you create your project, all you need to do is apply the transformation, you can send it to clients in a batch file or similar.
ps remember that issuing a shell command as a custom action is not the best way to execute it. This will cause the machine to reboot and not return the correct exit code 3010 , so if someone tries to catch the exit code or does / norestart on the command line, the shell command will ignore this.
EDIT Once you have created the msi file, open its orca , and then add the necessary changes to the tables in schedulereboot. Save the changes as a conversion, then until the msi file changes a lot, you can simply apply the conversion to msi every time you run it.
Personaly I would not want to do this, as this is an additional step, and you should be able to do this in the source.
To add a reboot sequence to orca, go to the InstallExecuteSequence table and find the InstallFinalize entry. Add a new ScheduleReboot entry and enter a number in the sequence column, which is 1 more than the sequence from the InstallFinalize step.