Skip to content

Commit 0bbe318

Browse files
anjannathredbeam
authored andcommitted
remove enabling of file sharing and creation of smbshare from MSI
this will be moved to the 'crc setup' command as we should only enable file sharing and create the smb share for home dir when users have set the config option 'enable-shared-dirs' to 'true' this should remove at least of the warnings reported by virustotal for the MSI: https://www.virustotal.com/gui/file/31b402dcc1da24265074a21a26018d6cde8eef0b63c77a18f89eb079b6556790
1 parent 6120dc5 commit 0bbe318

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

packaging/windows/product.wxs.template

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535
Name="Path" />
3636
</Property>
3737

38-
<Property Id="USERFOLDER">
39-
<DirectorySearch Id="userProfileSearch" Depth="0" Path="[%USERPROFILE]" />
40-
</Property>
41-
42-
<Property Id="SHAREDDIRNAME" Secure="yes">crc-dir0</Property>
43-
4438
<util:Group Id="CrcUsersGroup" Name="crc-users" />
4539
<Directory Id="TARGETDIR" Name="SourceDir">
4640
<Directory Id="ProgramFiles64Folder">
@@ -97,24 +91,6 @@
9791
Before="AddUserToHypervAdminGroup"
9892
Sequence="execute"/>
9993
<CustomAction Id="AddUserToHypervAdminGroup" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
100-
<SetProperty Action="CACreateSMBShare"
101-
Id="CreateSMBShare"
102-
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;New-SmbShare -Name '[SHAREDDIRNAME]' -Path '[USERFOLDER]' -FullAccess '[LogonUser]'&quot;"
103-
Before="CreateSMBShare"
104-
Sequence="execute"/>
105-
<CustomAction Id="CreateSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
106-
<SetProperty Action="CAEnableFileAndPrinterSharing"
107-
Id="EnableFileAndPrinterSharing"
108-
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Set-NetFirewallRule -Group '@FirewallAPI.dll,-28502' -Enabled True -Profile 'Private,Public'&quot;"
109-
Before="EnableFileAndPrinterSharing"
110-
Sequence="execute"/>
111-
<CustomAction Id="EnableFileAndPrinterSharing" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
112-
<SetProperty Action="CARemoveSMBShare"
113-
Id="RemoveSMBShare"
114-
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Remove-SmbShare -Name '[SHAREDDIRNAME]' -Force&quot;"
115-
Before="RemoveSMBShare"
116-
Sequence="execute"/>
117-
<CustomAction Id="RemoveSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
11894

11995
<InstallExecuteSequence>
12096
<Custom Action="CreateCrcGroup" Before="ConfigureUsers"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
@@ -123,9 +99,6 @@
12399
<Custom Action="InstallHyperv" Before="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
124100
<Custom Action="RemoveCrcGroupRollback" After="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
125101
<Custom Action="RemoveCrcDaemonTask" Before='RemoveFiles'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
126-
<Custom Action="EnableFileAndPrinterSharing" After="AddUserToHypervAdminGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom>
127-
<Custom Action="CreateSMBShare" After="EnableFileAndPrinterSharing"> NOT Installed AND NOT REMOVE~="ALL"</Custom>
128-
<Custom Action="RemoveSMBShare" After='RemoveCrcDaemonTask'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
129102
<ScheduleReboot After="InstallFinalize"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</ScheduleReboot>
130103
</InstallExecuteSequence>
131104
<Feature Id="DefaultFeature" Title="Install core features" Absent="disallow" Level="1">
@@ -146,9 +119,6 @@
146119
<ProgressText Action="InstallHyperv">Installing Hyper-V</ProgressText>
147120
<ProgressText Action="AddUserToHypervAdminGroup">Adding user: [LogonUser] to Hyper-V Administrators group</ProgressText>
148121
<ProgressText Action="RemoveCrcDaemonTask">Removing crcDaemon task</ProgressText>
149-
<ProgressText Action="CreateSMBShare">Creating share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText>
150-
<ProgressText Action="RemoveSMBShare">Removing share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText>
151-
<ProgressText Action="EnableFileAndPrinterSharing">Enabling file and printer Sharing</ProgressText>
152122
</UI>
153123
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
154124
<!-- this should help to propagate env var changes -->

0 commit comments

Comments
 (0)