[wpkg-users] Uninstall prohbited Applications

Дубовский А.Г. A.Dubovskiy at gedore.ru
Thu Sep 16 06:31:59 CEST 2010

To uninstall prohibited applications I've developed a little script. Its convenience is the fact that you can specify a mask to uninstall the programs like "Adobe%".
Its disadvantages are the relatively large time to check prohibited applications.
  Set theSoftware = objWMICall.ExecQuery ("select * from Win32_Product Where " & SoftList)
Maybe a developers come up to integrate into WPKG uninstall prohibited applications, or speed up apps checking with "like" feature.
The beauty WMICall.Uninstall() lies in the fact that it  is looking for a UninstallString and uninstall application quiet.

theFile = "\\MyServerIp\DEPLOY$\wpkg\ProhibitedApplications <file://myserverip/DEPLOY$/wpkg/ProhibitedPackages> .xml"
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(theFile) then
 for each theNode in xmlDoc.documentElement.childNodes
  if WhereList<>"" then WhereList=WhereList & " or "
  theUninst = theNode.NodeTypedValue
  if Instr(theUninst,"%")>0 then 
   WhereList=WhereList & "Name like '" & theUninst & "'" 
   WhereList=WhereList & "Name ='" & theUninst &"'" 
  end if
 if WhereList<>"" then
  Set theSoftware = objWMICall.ExecQuery ("select * from Win32_Product Where " & SoftList)
  For Each SoftwareComponent in theSoftware
 end if
end if

ProhibitedApplications.xml  <file://\\MyServerIp\DEPLOY$\wpkg\ProhibitedApplications.xml >    - EXAMPLE. If Uninstall value contain "%", it uninstall all by mask

 <?xml version="1.0" encoding="UTF-8"?>
 <Uninstall>Adobe Reader%</Uninstall>
 <Uninstall>Microsoft Firewall Client%</Uninstall>
 <Uninstall>Ask Toolbar%</Uninstall>

with regards,
Alexey Dubovsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20100916/1cb9d8d0/attachment-0001.html>

More information about the wpkg-users mailing list