Fix WSP registry locator.
This commit is contained in:
parent
45fcf3f297
commit
5ab109df9a
2 changed files with 17 additions and 18 deletions
|
@ -540,8 +540,8 @@
|
||||||
<!---->
|
<!---->
|
||||||
<Property Id="VALIDATE_OK" Secure="yes" Value="0" />
|
<Property Id="VALIDATE_OK" Secure="yes" Value="0" />
|
||||||
<Property Id="VALIDATE_MSG" Secure="yes" />
|
<Property Id="VALIDATE_MSG" Secure="yes" />
|
||||||
<Property Id ="WSP_ROOT" Secure="yes">
|
<Property Id ="WSP_BASE" Secure="yes">
|
||||||
<RegistrySearch Id='Search_WSP_ROOT' Root='HKCU' Key='SOFTWARE\[ProductName]' Name='Root' Type='raw' />
|
<RegistrySearch Id='Search_WSP_BASE' Root='HKLM' Key='SOFTWARE\[ProductName]' Name='Base' Type='raw' />
|
||||||
</Property>
|
</Property>
|
||||||
<!--CustomActions.-->
|
<!--CustomActions.-->
|
||||||
<!-- <CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
|
<!-- <CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
|
||||||
|
@ -590,7 +590,7 @@
|
||||||
<CustomAction Id="CA_PropertyOnPortalRemove" Property="CA_OnPortalRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
|
<CustomAction Id="CA_PropertyOnPortalRemove" Property="CA_OnPortalRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
|
||||||
<CustomAction Id="CA_OnPortalRemove" BinaryKey="Assembly_CA" DllEntry="OnPortalRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
|
<CustomAction Id="CA_OnPortalRemove" BinaryKey="Assembly_CA" DllEntry="OnPortalRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
|
||||||
<!---->
|
<!---->
|
||||||
<SetProperty Id="WEBSITEPANELDIR" After="AppSearch" Value="[WSP_ROOT]">WSP_ROOT</SetProperty>
|
<SetProperty Id="WEBSITEPANELDIR" After="AppSearch" Value="[WSP_BASE]">WSP_BASE</SetProperty>
|
||||||
<CustomAction Id="CA_PreFillSettings" BinaryKey="Assembly_CA" DllEntry="PreFillSettings" />
|
<CustomAction Id="CA_PreFillSettings" BinaryKey="Assembly_CA" DllEntry="PreFillSettings" />
|
||||||
<!--Exe sequence.-->
|
<!--Exe sequence.-->
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
|
@ -684,9 +684,9 @@
|
||||||
<Component Id ="comp_WebsitePanel_config" Directory="WEBSITEPANELDIR" Guid="{28CD1ADB-562C-4E38-A3B6-325D3A2718B1}">
|
<Component Id ="comp_WebsitePanel_config" Directory="WEBSITEPANELDIR" Guid="{28CD1ADB-562C-4E38-A3B6-325D3A2718B1}">
|
||||||
<File Id="file_WebsitePanel_config" KeyPath="yes" Source="WebsitePanel.config" />
|
<File Id="file_WebsitePanel_config" KeyPath="yes" Source="WebsitePanel.config" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Directory="WEBSITEPANELDIR">
|
<Component Id="comp_WebsitePanel_reg_locator" Directory="WEBSITEPANELDIR" Guid="{CC35E1B5-3E29-4AD1-991C-2904E4DCB099}">
|
||||||
<RegistryValue Root='HKCU' Key='SOFTWARE\[ProductName]'
|
<RegistryValue Root='HKLM' Key='SOFTWARE\[ProductName]'
|
||||||
Name='Root' Value='[WEBSITEPANELDIR]'
|
Name='Base' Value='[WEBSITEPANELDIR]'
|
||||||
Type='string' />
|
Type='string' />
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
|
|
|
@ -68,17 +68,6 @@ namespace WebsitePanel.WIXInstaller
|
||||||
Log.WriteEnd("PreFillSettings");
|
Log.WriteEnd("PreFillSettings");
|
||||||
return ActionResult.Success;
|
return ActionResult.Success;
|
||||||
}
|
}
|
||||||
private static void TryApllyNewPassword(Session Ctx, string Id)
|
|
||||||
{
|
|
||||||
var Pass = Ctx[Id];
|
|
||||||
if(string.IsNullOrWhiteSpace(Pass))
|
|
||||||
{
|
|
||||||
Pass = Guid.NewGuid().ToString();
|
|
||||||
Ctx[Id] = Pass;
|
|
||||||
Ctx[Id + "_CONFIRM"] = Pass;
|
|
||||||
Log.WriteInfo("New password was applied to " + Id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[CustomAction]
|
[CustomAction]
|
||||||
public static ActionResult InstallWebFeatures(Session session)
|
public static ActionResult InstallWebFeatures(Session session)
|
||||||
{
|
{
|
||||||
|
@ -778,6 +767,17 @@ namespace WebsitePanel.WIXInstaller
|
||||||
{
|
{
|
||||||
Debugger.Launch();
|
Debugger.Launch();
|
||||||
}
|
}
|
||||||
|
private static void TryApllyNewPassword(Session Ctx, string Id)
|
||||||
|
{
|
||||||
|
var Pass = Ctx[Id];
|
||||||
|
if (string.IsNullOrWhiteSpace(Pass))
|
||||||
|
{
|
||||||
|
Pass = Guid.NewGuid().ToString();
|
||||||
|
Ctx[Id] = Pass;
|
||||||
|
Ctx[Id + "_CONFIRM"] = Pass;
|
||||||
|
Log.WriteInfo("New password was applied to " + Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class SessionExtension
|
public static class SessionExtension
|
||||||
{
|
{
|
||||||
|
@ -788,7 +788,6 @@ namespace WebsitePanel.WIXInstaller
|
||||||
WiXSetup.InstallLogListener(new WiXLogFileListener());
|
WiXSetup.InstallLogListener(new WiXLogFileListener());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum WiXInstallType: byte
|
internal enum WiXInstallType: byte
|
||||||
{
|
{
|
||||||
InstallServer,
|
InstallServer,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue