Skip to content

Commit 752eac7

Browse files
committed
Fix firewall rule removal
Closes #884
1 parent 4116e4e commit 752eac7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qz/installer/WindowsInstaller.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public Installer removeSystemSettings() {
109109
}
110110

111111
// Cleanup firewall rules
112-
ShellUtilities.execute("netsh.exe", "advfirewall", "delete", "rule", String.format("name=%s", ABOUT_TITLE));
112+
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "delete", "rule", String.format("name=%s", ABOUT_TITLE));
113113
return this;
114114
}
115115

@@ -146,7 +146,7 @@ public Installer addSystemSettings() {
146146

147147
// Firewall rules
148148
String ports = StringUtils.join(PrintSocketServer.SECURE_PORTS, ",") + "," + StringUtils.join(PrintSocketServer.INSECURE_PORTS, ",");
149-
ShellUtilities.execute("netsh.exe", "advfirewall", "delete", "rule", String.format("name=%s", ABOUT_TITLE));
149+
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "delete", "rule", String.format("name=%s", ABOUT_TITLE));
150150
ShellUtilities.execute("netsh.exe", "advfirewall", "firewall", "add", "rule", String.format("name=%s", ABOUT_TITLE),
151151
"dir=in", "action=allow", "profile=any", String.format("localport=%s", ports), "localip=any", "protocol=tcp");
152152
return this;

0 commit comments

Comments
 (0)