I am trying to write a script that prevents automatic reboot after the uninstall. The syntax for the WMIC abort uninstall has been added into my script (/nointeractive|wmic && shutdown /a) however it doesn’t appear to take effect. When I uninstall a program using this script it still automatically reboots. Is there something that can be added to the script to prevent automatic reboots OR is there a way to prompt the user to restart and give them the postpone options like in the OS or 3rd party patching procedures?
proName=‘FortiClient’
import os;
out=os.popen(‘wmic product where name="%s" call uninstall /nointeractive|wmic && shutdown /a’%(proName)).read();
print(out);