Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Software installation is rarely permanent; instead, software is typically removed at some point in time, and for any number of reasons:
The Win32_Product Uninstall method can be used to remove software from a computer. 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. For example, if Microsoft Excel has been installed on a computer, you can use the Uninstall method to remove it. However, if Microsoft Excel is available to the user through Group Policy, the user will be able to reinstall the application.
Listing 8.17 contains a script that deletes software on a computer. To carry out this task, the script must perform the following steps:
Because only one software package is to be deleted, include a WHERE clause to limit data retrieval to installed applications with the name Personnel Database. Otherwise, the script would remove all the software installed on the computer.
Listing 8.17 Removing Software
|
|
Send us your feedback | « Previous | Next » |