Jump to content

Recommended Posts

Posted

I would like to remove a exception from Windows Firewall the name of the entry is:

wIntegrate Session Manager

 

The path can be different on oher machines so we can use that in the script can someone make a script that removes the wIntegrate Session Manager?

 

Thanks,

Simon :)

Posted

Remove application exception (VBScript) - Windows Server 2003 Networking Recipes

 

' From the book "Windows Server 2003 Networking Recipes"

' This code removes an existing application exception
'  and re-creates it with new values
' ------ SCRIPT CONFIGURATION ------
Set Firewall = CreateObject("HNetCfg.FwMgr")
Set Policy = Firewall.LocalPolicy
Set Profile = Policy.GetProfileByType(1)
strCurrentApp = "c:\program files\image\image123.exe"
strNewApp = "c:\program files\image\imaging.exe"
' ------ END CONFIGURATION ---------

Set colApplications = Profile.AuthorizedApplications

For Each Application in colApplications
 If Application.ProcessImageFileName = strCurrentApp Then
   WScript.Echo "Removed " & Application.Name " from authorized list!"
   colApplications.Remove(Application)
 End If
Next

Set newApplication = CreateObject("HNetCfg.FwAuthorizedApplication")
newApplication.Name = "Imaging"
newApplication.IPVersion = 2
newApplication.ProcessImageFileName = strNewApp
newApplication.RemoteAddresses = "*"
newApplication.Scope = 0
newApplication.Enabled = True

colApplications.Add(objApplication)

WScript.Echo "Application " & strNewApp & " added successfully!"

As you can see in the code snippet above it removes current exceptions from the firewall and re adds new ones so you can obviously alter the code to your liking.

Posted

Thanks im having problems edditing it can get it to work sorry.

 

All i want is it to find the Windows Firewall entry named:

 

wIntegrate Session Manager

path = never the same

 

And I just want it to delete it I dont need to replace it.

 

Thanks,

Simon:)

Posted (edited)

Untested but this should work:

' ------ SCRIPT CONFIGURATION ------
Set Firewall = CreateObject("HNetCfg.FwMgr")
Set Policy = Firewall.LocalPolicy
Set Profile = Policy.GetProfileByType(1)
strCurrentApp = "wIntegrate Session Manager"
' ------ END CONFIGURATION ---------
Set colApplications = Profile.AuthorizedApplications
For Each Application in colApplications
 If Application.Name = strCurrentApp Then
   WScript.Echo "Removed " & Application.Name & " from authorized list!"
   colApplications.Remove(Application)
 End If
Next

Edited by SYNACK
Fixed error
Posted

It pops up saying Removed wIntegrate Session Manager from authorized list! then pops up saying:

 

Line:11

Char:5

Error: Type mismatch: 'colApplications.Remove'

Code: 800A000D

Source: Microsoft VBScript runtime error

 

And the wIntegrate Session Manager is still listed in the firewall Exceptions. :(

Posted

longer example here on ms site

 

RemovePrograms-com.vbs

 

Is there anyway you can look in the registry on a couple of computers to see if there is a definte registry key where it has the path to the wintegrate session manager application exe or at least to the correct directory.

 

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

 

Hopefully in that registry key you should be able to find the session manager and hopefully it should give you a path which you can use in the vbscript to remove it.

  • Thanks 1
Posted

Yes we could find the path as i could run this script before the one below or maybe merge it together:

 

set oFSO=createobject("scripting.filesystemobject")
set oShell=createobject("wscript.shell")
Dim objFSO, objFiles, objShell, intCount
Dim strFile, strName, strLongName, strDirectory, strEnv, strExt
Set objShell = CreateObject("Wscript.Shell")
strEnv = objShell.ExpandEnvironmentStrings("%temp%")
intcount = 0


on error resume next
sFile=oShell.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\IbsFont")
on error goto 0
if sFile="" then 
else
set oFile=ofso.getfile(sFile)
sfolder=oFile.parentfolder & "\session"
ofso.copyfolder sFolder , strEnv & "\tempkcs" , true
end if

 

The path is the wIntegSM.exe located in the oFile.parentfolder (e.g. C:\Program Files\wIntegrate\wIntegSM.exe)

Posted

In the MS example it requires the name of the exception or application exe / process name and also the full path to the exe including the exe ie

 

notepad

 

x:\windows\system32\notepad.exe

  • Thanks 1
Posted
Your properly right, but don’t worry about it I found even the official installer from IBM did not clean this up so it doesn’t matter and as lest now the new installer I made that adds the firewall entry with Advanced Installer now removes the new entry on uninstall so lets not worry about cleaning someone’s old mess its not worth worrying about. ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...