|
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"> |
|
97 | 91 | Before="AddUserToHypervAdminGroup" |
98 | 92 | Sequence="execute"/> |
99 | 93 | <CustomAction Id="AddUserToHypervAdminGroup" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
100 | | - <SetProperty Action="CACreateSMBShare" |
101 | | - Id="CreateSMBShare" |
102 | | - Value=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "New-SmbShare -Name '[SHAREDDIRNAME]' -Path '[USERFOLDER]' -FullAccess '[LogonUser]'"" |
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=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "Set-NetFirewallRule -Group '@FirewallAPI.dll,-28502' -Enabled True -Profile 'Private,Public'"" |
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=""[POWERSHELLEXE]" -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command "Remove-SmbShare -Name '[SHAREDDIRNAME]' -Force"" |
115 | | - Before="RemoveSMBShare" |
116 | | - Sequence="execute"/> |
117 | | - <CustomAction Id="RemoveSMBShare" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> |
118 | 94 |
|
119 | 95 | <InstallExecuteSequence> |
120 | 96 | <Custom Action="CreateCrcGroup" Before="ConfigureUsers"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
|
123 | 99 | <Custom Action="InstallHyperv" Before="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
124 | 100 | <Custom Action="RemoveCrcGroupRollback" After="CreateCrcGroup"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</Custom> |
125 | 101 | <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> |
129 | 102 | <ScheduleReboot After="InstallFinalize"> NOT Installed AND NOT REMOVE~="ALL" AND NOT WIX_UPGRADE_DETECTED</ScheduleReboot> |
130 | 103 | </InstallExecuteSequence> |
131 | 104 | <Feature Id="DefaultFeature" Title="Install core features" Absent="disallow" Level="1"> |
|
146 | 119 | <ProgressText Action="InstallHyperv">Installing Hyper-V</ProgressText> |
147 | 120 | <ProgressText Action="AddUserToHypervAdminGroup">Adding user: [LogonUser] to Hyper-V Administrators group</ProgressText> |
148 | 121 | <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> |
152 | 122 | </UI> |
153 | 123 | <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> |
154 | 124 | <!-- this should help to propagate env var changes --> |
|
0 commit comments