0

I made the following script "[SystemFolder]cmd.exe" /c "netsh advfirewall firewall add rule name="RuleName" action=allow protocol=TCP dir=in localport=399"

and i made a dialog in setup that take the Port number and set it to a property called ServerPort .. now my question is how to pass this value to this script ?

1 Answer 1

2

First you should change the property name to SERVER_PORT so it's public. Properties with lowercase letters do not pass their modified values to InstallExecuteSequence.

After that, you can try something like this:

"[SystemFolder]cmd.exe" /c "netsh advfirewall firewall add rule name="RuleName" action=allow protocol=TCP dir=in localport=[SERVER_PORT]"
Sign up to request clarification or add additional context in comments.

1 Comment

It should also be marked Secure. BTW, if it was me, I'd create a WiX merge module and use the Firewall extension to do this. The module can then be merged into the InstallShield project as I've described in my blog. blog.deploymentengineering.com/2011/01/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.