I've got an installer that installs the oracle XE database. Recently, I've been asked to close/block port 1521 programmatically during installation. My app is installed using Wix 3.8. I've seen the Wix Firewall Extension, but I don't see a way to specify the action (ie, "block"). I want to block all incoming traffic on that port, effectively shutting down the listener.
Is there another way to do this or am I missing something with Wix?
In case the Wix extension doesn't support this (which would surprise me), perhaps you can try this VBScript.
Note that I didn't write this script, nor have I used it. Use with caution and at your own risk . Test on a virtual machine.
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
Set objPort = colPorts.Item(9999,6)
objPort.Enabled = FALSE
Similar code, but using C#: Automating Windows Firewall with
Update: We weren't able to get WiX installer to do what we wanted, so we wrote our own custom process (not a CustomAction) that runs post install.
The 3 mains steps were:
> TCP.VALIDNODE_CHECKING=YES > TCP.INVITED_NODES = 127.0.0.1
> exec DBMS_XDB.SETLISTENERLOCALACCESS(true); > SHUTDOWN IMMEDIATE > STARTUP
Hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.