I discovered someone else's suggestion to append your WMIC command with the below boldfaced , and it's worked for me! In the command prompt, type wmic and press Enter.
Type product get name and press Enter. To continue this discussion, please ask a new question. Laplink Software, Inc. Neil Laplink. Get answers from your peers along with millions of IT pros who visit Spiceworks. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search.
I'm currently writing a script that has to uninstall a program from lots of computers at once, the only place I could find information on how to do it for this specific program is by using wmic , however every time I run the command the machine does a hard reboot. Is there a way using wmic , to prevent a script from rebooting afer uninstalling a package?
This is the command I'm currently using on Windows I have found a solutions that has worked for me and seeing as how Google has only yielded me that same results as above I hope this helps. It probably depends on the specific uninstall procedure as some vendors may force an immediate restart while others give a short time for an abort to work. MrGoodTimes answer did not work for me but I found out that putting this before his code worked.
Apparently, if there is already a shutdown in progress, the immediate shutdown will not be executed, giving time for an abort. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. For more information about using this method see Calling a Method. Software installation is rarely permanent; instead, software is typically removed at some point in time, and for any number of reasons:. The Uninstall method can be used either on the local computer or on a remote computer, and without delegation. This is because no multihop security operations are involved.
Instead, the software is simply removed from the computer. Although the Uninstall method can remove software from a computer, it does not override Group Policy.
0コメント