Forums  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Member List  Search  FAQ  Ticket List  Log Out

 

LNSS Script Editor, Uninstall Programs

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Networking & Security] >> GFI EndPointSecurity >> LNSS Script Editor, Uninstall Programs Page: [1]
Login
Message << Older Topic   Newer Topic >>
LNSS Script Editor, Uninstall Programs - 7.Oct.2008 9:15:28 AM   
zdunham

 

Posts: 2
Joined: 2.Oct.2008
Status: offline
Hi, my name is Zach and this is my first post. At work I've been assigned to write a script in the LNSS Script Editor to put in a computer name on the network and select a program to uninstall, then uninstall it. Here is what I have so far:

Dim inputString
Dim inputProgram
inputComputer = InputBox("Computers:")

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & inputComputer & "\root\cimv2")

Dim list
Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product")
For Each objSoftware In colSoftware
 list = list + objSoftware.Name & vbCrLf
Next

inputProgram = InputBox(list)

Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product Where Name = '" & inputProgram & "'")
For Each objSoftware In colSoftware
 objSoftware.Uninstall()
Next 


Not sure if this was the right forum to put this in so feel free to move it. It lets me enter the computer name and lets me enter a program name from the list but then does not uninstall anything. If anyone knows anything about this it would be greatly appreciated. Thanks.
Post #: 1
RE: LNSS Script Editor, Uninstall Programs - 8.Oct.2008 9:18:22 AM   
DrewE

 

Posts: 1246
Joined: 28.Apr.2008
From: Cary, NC
Status: offline
To better understand what product you are referring to, when would you like this list of applications to uninstall to pop-up?  Is this a separate application to be run once noticing an application listed in the GFI Languard N.S.S. scanner?

_____________________________

Drew Easley
GFI Software
Talk Tech To Me (GFI Blog)Follow Us (Twitter) - Watch Us (YouTube) - Join us (Facebook)

(in reply to zdunham)
Post #: 2
RE: LNSS Script Editor, Uninstall Programs - 9.Oct.2008 8:59:00 AM   
zdunham

 

Posts: 2
Joined: 2.Oct.2008
Status: offline
quote:

ORIGINAL: DrewE

To better understand what product you are referring to, when would you like this list of applications to uninstall to pop-up?  Is this a separate application to be run once noticing an application listed in the GFI Languard N.S.S. scanner?


Yes its a script written in VBScript which I did in the LNSS Script Editor, I'm assuming that the person I'm making this for would use it after a Languard Scan. What I wrote works up to where it lists the Windows programs, the list comes up fine on whatever computer on the network I enter, but it just does not uninstall, everywhere I've looked about the WMI that is exactly what I'm supposed to have.

Also, do you think its possible that since the new version of GFI already has an ability built in to uninstall programs remotely that they disabled the Uninstall() call in the WMI so that you couldn't create a process that is already available?

< Message edited by zdunham -- 9.Oct.2008 2:26:25 PM >

(in reply to DrewE)
Post #: 3
RE: LNSS Script Editor, Uninstall Programs - 10.Oct.2008 8:53:09 AM   
DrewE

 

Posts: 1246
Joined: 28.Apr.2008
From: Cary, NC
Status: offline
This type of post may better be suited in a Microsoft developer forum as our products typically don't support VBS scripts very often.  One of our applications (GFI Network Server Monitor) does supports VBS scripts, and you may find some limited success from users monitoring those forums.

_____________________________

Drew Easley
GFI Software
Talk Tech To Me (GFI Blog)Follow Us (Twitter) - Watch Us (YouTube) - Join us (Facebook)

(in reply to zdunham)
Post #: 4
Page:   [1]
All Forums >> [Networking & Security] >> GFI EndPointSecurity >> LNSS Script Editor, Uninstall Programs Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts