For most cases, DOSBox is probably the way to go ... you can install FreeDOS directly with the “Install to Harddisk” command, or you can go into the live environment and play around with ...
It is possible to run Windows Update from the command line. Similarly, it is also possible to install or update drivers using the Command Prompt. Microsoft offers a built-in utility PnPUtil.exe ...