Refact. Msi, remove unused code (#7685)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-04-11 12:06:10 +08:00 committed by GitHub
parent 64020758d9
commit aa002c5d60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 24 deletions

View File

@ -1,6 +1,6 @@
// CustomAction.cpp : Defines the entry point for the custom action.
#include "pch.h"
#include <stdlib.h>
#include <strutil.h>
#include <shellapi.h>
#include <tlhelp32.h>
@ -70,26 +70,6 @@ LExit:
return WcaFinalize(er);
}
#include "../../../src/platform/windows_delete_test_cert.cc";
UINT __stdcall DeleteTestCerts(
__in MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
DWORD er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "DeleteTestCerts");
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
DeleteRustDeskTestCertsW();
WcaLog(LOGMSG_STANDARD, "DeleteRustDeskTestCertsW finished.");
LExit:
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
return WcaFinalize(er);
}
// https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess
// **NtQueryInformationProcess** may be altered or unavailable in future versions of Windows.
// Applications should use the alternate functions listed in this topic.

View File

@ -3,5 +3,4 @@ LIBRARY "CustomActions"
EXPORTS
CustomActionHello
RemoveInstallFolder
DeleteTestCerts
TerminateProcesses

View File

@ -30,7 +30,6 @@
<Custom Action="RemoveInstallFolder.SetParam" After="RemoveFiles"/>
<Custom Action="RemoveInstallFolder" After="RemoveInstallFolder.SetParam"/>
<Custom Action="DeleteTestCerts" After="RemoveFiles"/>
</InstallExecuteSequence>
<!-- Shortcuts -->

View File

@ -6,7 +6,6 @@
<CustomAction Id="CustomActionHello" DllEntry="CustomActionHello" Impersonate="yes" Execute="immediate" Return="ignore" BinaryRef="Custom_Actions_Dll"/>
<CustomAction Id="RemoveInstallFolder" DllEntry="RemoveInstallFolder" Impersonate="no" Execute="deferred" Return="ignore" BinaryRef="Custom_Actions_Dll"/>
<CustomAction Id="DeleteTestCerts" DllEntry="DeleteTestCerts" Impersonate="no" Execute="deferred" Return="ignore" BinaryRef="Custom_Actions_Dll"/>
<CustomAction Id="TerminateProcesses" DllEntry="TerminateProcesses" Impersonate="yes" Execute="immediate" Return="ignore" BinaryRef="Custom_Actions_Dll"/>
</Fragment>
</Wix>