I created "REBOOT.COM" and then had our master control application call it on command. The hardest part was working out how to programmatically reboot the PC - for some reason the mainframe guys couldn't work out that a simple "JMP FFFF" was all we needed. Scored points that day. :)
I recall writing REBOOT.COM myself by using EDIT.COM and writing two bytes (0xCD 0x18 by typing Alt-205 Alt-24, if I recall right) and saving it. That executes interrupt 0x18 which should start the BASIC interpreter in the ROM. But most PCs didn't have one, so instead it rebooted. I discovered this by experimentation :-)
I miss the days when solutions could be that tight. You could have written that .com file with a hex editor back then. Now an ELF header and symbol table is bigger than edit.com
Well, this was in the very early days of DOS, where it was being used as a front-end for other bigger systems, so it was considered not much better than a dumb terminal, albeit re-programmable so .. on these "workstations" that needed REBOOT.COM installed, we didn't even have DEBUG.COM - only the master control program (quite literally, a .BAT file), which didn't have a facility to put new apps on all the little DOS machines - admins had to do it manually.
So we all got used to using COPY CON: C:\REBOOT.COM and some sort of Alt-key combo for "JMP FFFF", which defeats me since I haven't thought about it in 30 years or so .. but yeah. It was the last manual-install we did as an admin/dev team, as the reboot was needed so that we could finally add "Remotely administer Workstation Base Image" to the master control program/.BAT file and save ourselves endless late nights. ;)
(I once had to rebuild a partition table by hand using nothing but DEBUG.COM and Peter Norton's book..)