SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    May 2004
    Location
    USA
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Script to remove software on local computer

    Hi,

    I have the script to remove the software if the software was installed using Microsoft Installer ONLY( .msi file). It does not work if the software installed using other tool. [img]images/icons/tongue.gif[/img] Any one can help me with the script which can remove any software using differrent tool such as Install Shield or others tools?

    Thanks, [img]images/icons/rolleyes.gif[/img]

    ------------------------

    strComputer = "." ' Set to run on the local machine
    ' apply to WMI service
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    ' Try to remove specific software
    Set colSoftware = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_Product WHERE Name = 'Specific Software name'")
    For Each objSoftware in colSoftware
    objSoftware.Uninstall()
    Next
    Thanks,

    ---------------------------

    Sunrise - Happy Testing

  2. #2
    Moderator
    Join Date
    Oct 2005
    Location
    UK
    Posts
    407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script to remove software on local computer

    For Installshield there is usually a registry entry with the path for the uninstall. e.g.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\<application>\Uninstall String

    Just get the string and execute it. You may have to cope with any dialogs which remove dlls etc.

    Ron
    Ron
    *******
    If you had to identify, in one word, the reason
    why the human race has not achieved, and never
    will achieve, its full potential that word would be "meetings".

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:47 AM.

Copyright BetaSoft Inc.