|
35 | 35 | Name="Path" /> |
36 | 36 | </Property> |
37 | 37 |
|
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 | | - |
44 | 38 | <util:Group Id="CrcUsersGroup" Name="crc-users" /> |
45 | 39 | <Directory Id="TARGETDIR" Name="SourceDir"> |
46 | 40 | <Directory Id="ProgramFiles64Folder"> |
|
92 | 86 | Before="AddUserToHypervAdminGroup" |
93 | 87 | Sequence="execute"/> |
94 | 88 | <CustomAction Id="AddUserToHypervAdminGroup" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
95 | | - <SetProperty Action="CACreateSMBShare" |
96 | | - Id="CreateSMBShare" |
97 | | - Value=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "New-SmbShare -Name '[SHAREDDIRNAME]' -Path '[USERFOLDER]' -FullAccess '[LogonUser]'"" |
98 | | - Before="CreateSMBShare" |
99 | | - Sequence="execute"/> |
100 | | - <CustomAction Id="CreateSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
101 | | - <SetProperty Action="CAEnableFileAndPrinterSharing" |
102 | | - Id="EnableFileAndPrinterSharing" |
103 | | - Value=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "Set-NetFirewallRule -Group '@FirewallAPI.dll,-28502' -Enabled True -Profile 'Private,Public'"" |
104 | | - Before="EnableFileAndPrinterSharing" |
105 | | - Sequence="execute"/> |
106 | | - <CustomAction Id="EnableFileAndPrinterSharing" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
107 | | - <SetProperty Action="CARemoveSMBShare" |
108 | | - Id="RemoveSMBShare" |
109 | | - Value=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "Remove-SmbShare -Name '[SHAREDDIRNAME]' -Force"" |
110 | | - Before="RemoveSMBShare" |
111 | | - Sequence="execute"/> |
112 | | - <CustomAction Id="RemoveSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
113 | 89 |
|
114 | 90 | <InstallExecuteSequence> |
115 | 91 | <Custom Action="CreateCrcGroup" Before="ConfigureUsers"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
|
118 | 94 | <Custom Action="InstallHyperv" Before="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
119 | 95 | <Custom Action="RemoveCrcGroupRollback" After="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
120 | 96 | <Custom Action="RemoveCrcDaemonTask" Before='RemoveFiles'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom> |
121 | | - <Custom Action="EnableFileAndPrinterSharing" After="AddUserToHypervAdminGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
122 | | - <Custom Action="CreateSMBShare" After="EnableFileAndPrinterSharing"> NOT Installed AND NOT REMOVE~="ALL"</Custom> |
123 | | - <Custom Action="RemoveSMBShare" After='RemoveCrcDaemonTask'>Installed AND NOT UPGRADINGPRODUCTCODE</Custom> |
124 | 97 | <ScheduleReboot After="InstallFinalize"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</ScheduleReboot> |
125 | 98 | </InstallExecuteSequence> |
126 | 99 | <Feature Id="DefaultFeature" Title="Install core features" Absent="disallow" Level="1"> |
|
140 | 113 | <ProgressText Action="InstallHyperv">Installing Hyper-V</ProgressText> |
141 | 114 | <ProgressText Action="AddUserToHypervAdminGroup">Adding user: [LogonUser] to Hyper-V Administrators group</ProgressText> |
142 | 115 | <ProgressText Action="RemoveCrcDaemonTask">Removing crcDaemon task</ProgressText> |
143 | | - <ProgressText Action="CreateSMBShare">Creating share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText> |
144 | | - <ProgressText Action="RemoveSMBShare">Removing share named: [SHAREDDIRNAME] for folder: [USERFOLDER]</ProgressText> |
145 | | - <ProgressText Action="EnableFileAndPrinterSharing">Enabling file and printer Sharing</ProgressText> |
146 | 116 | </UI> |
147 | 117 | <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> |
148 | 118 | <!-- this should help to propagate env var changes --> |
|
0 commit comments