Skip to content

Commit

Permalink
msi: ignore errors from custom action creating the smb shared dir
Browse files Browse the repository at this point in the history
if an smb share with the same name ('crc-dir0') already exits the
custom action fails marking the whole installation as failed

we can safely ignore this error as crc also checks that the share
exists before trying to use it
  • Loading branch information
anjannath committed Oct 12, 2022
1 parent f853c05 commit 2aa7059
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 @@ -112,7 +112,7 @@
Value=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "New-SmbShare -Name '[SHAREDDIRNAME]' -Path '[USERFOLDER]' -FullAccess '[LogonUser]'""
Before="CreateSMBShare"
Sequence="execute"/>
<CustomAction Id="CreateSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="check" />
<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;"
Expand Down

0 comments on commit 2aa7059

Please sign in to comment.