Skip to content

Commit

Permalink
msi: use firewall rule's Group id to enable printer and file sharing
Browse files Browse the repository at this point in the history
the DisplayGroup string is localized and it is recommended to
use the Group instead

ref: #3386 (comment)
  • Loading branch information
anjannath committed Oct 27, 2022
1 parent 25d3886 commit 684e8dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packaging/windows/product.wxs.template
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<CustomAction Id="CreateSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
<SetProperty Action="CAEnableFileAndPrinterSharing"
Id="EnableFileAndPrinterSharing"
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Enabled True -Profile 'Private,Public'&quot;"
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Set-NetFirewallRule -Group '@FirewallAPI.dll,-28502' -Enabled True -Profile 'Private,Public'&quot;"
Before="EnableFileAndPrinterSharing"
Sequence="execute"/>
<CustomAction Id="EnableFileAndPrinterSharing" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="check" />
Expand Down

0 comments on commit 684e8dc

Please sign in to comment.