Skip to content

Commit

Permalink
wip: remove enabling of file sharing a creation of smbshare from MSI
Browse files Browse the repository at this point in the history
  • Loading branch information
anjannath committed Feb 14, 2025
1 parent 457b653 commit 0f3f5a2
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions packaging/windows/product.wxs.template
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,6 @@
Before="AddUserToHypervAdminGroup"
Sequence="execute"/>
<CustomAction Id="AddUserToHypervAdminGroup" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
<SetProperty Action="CACreateSMBShare"
Id="CreateSMBShare"
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;New-SmbShare -Name '[SHAREDDIRNAME]' -Path '[USERFOLDER]' -FullAccess '[LogonUser]'&quot;"
Before="CreateSMBShare"
Sequence="execute"/>
<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 -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="ignore" />
<SetProperty Action="CARemoveSMBShare"
Id="RemoveSMBShare"
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Remove-SmbShare -Name '[SHAREDDIRNAME]' -Force&quot;"
Before="RemoveSMBShare"
Sequence="execute"/>
<CustomAction Id="RemoveSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />

<InstallExecuteSequence>
<Custom Action="CreateCrcGroup" Before="ConfigureUsers"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
Expand All @@ -118,9 +100,6 @@
<Custom Action="InstallHyperv" Before="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action="RemoveCrcGroupRollback" After="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action="RemoveCrcDaemonTask" Before='RemoveFiles'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
<Custom Action="EnableFileAndPrinterSharing" After="AddUserToHypervAdminGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action="CreateSMBShare" After="EnableFileAndPrinterSharing"> NOT Installed AND NOT REMOVE~="ALL"</Custom>
<Custom Action="RemoveSMBShare" After='RemoveCrcDaemonTask'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
<ScheduleReboot After="InstallFinalize"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</ScheduleReboot>
</InstallExecuteSequence>
<Feature Id="DefaultFeature" Title="Install core features" Absent="disallow" Level="1">
Expand All @@ -140,9 +119,6 @@
<ProgressText Action="InstallHyperv">Installing Hyper-V</ProgressText>
<ProgressText Action="AddUserToHypervAdminGroup">Adding user: [LogonUser] to Hyper-V Administrators group</ProgressText>
<ProgressText Action="RemoveCrcDaemonTask">Removing crcDaemon task</ProgressText>
<ProgressText Action="CreateSMBShare">Creating share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText>
<ProgressText Action="RemoveSMBShare">Removing share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText>
<ProgressText Action="EnableFileAndPrinterSharing">Enabling file and printer Sharing</ProgressText>
</UI>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<!-- this should help to propagate env var changes -->
Expand Down

0 comments on commit 0f3f5a2

Please sign in to comment.