Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Refact. Msi, remove unused code (#7685)

fufesouaa002c5d6011
diff --git a/res/msi/CustomActions/CustomActions.cpp b/res/msi/CustomActions/CustomActions.cpp
index 85ea27fe8..209b31a89 100644
--- a/res/msi/CustomActions/CustomActions.cpp
+++ b/res/msi/CustomActions/CustomActions.cpp
@@ -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.
diff --git a/res/msi/CustomActions/CustomActions.def b/res/msi/CustomActions/CustomActions.def
index 08a539cb7..0673ee1ad 100644
--- a/res/msi/CustomActions/CustomActions.def
+++ b/res/msi/CustomActions/CustomActions.def
@@ -3,5 +3,4 @@ LIBRARY "CustomActions"
EXPORTS
CustomActionHello
RemoveInstallFolder
- DeleteTestCerts
TerminateProcesses
diff --git a/res/msi/Package/Components/RustDesk.wxs b/res/msi/Package/Components/RustDesk.wxs
index cf41ba01a..f01c4999d 100644
--- a/res/msi/Package/Components/RustDesk.wxs
+++ b/res/msi/Package/Components/RustDesk.wxs
@@ -30,7 +30,6 @@
<Custom Action="RemoveInstallFolder.SetParam" After="RemoveFiles"/>
<Custom Action="RemoveInstallFolder" After="RemoveInstallFolder.SetParam"/>
- <Custom Action="DeleteTestCerts" After="RemoveFiles"/>
</InstallExecuteSequence>
<!-- Shortcuts -->
diff --git a/res/msi/Package/Fragments/CustomActions.wxs b/res/msi/Package/Fragments/CustomActions.wxs
index 500b5da40..0c1e61e4d 100644
--- a/res/msi/Package/Fragments/CustomActions.wxs
+++ b/res/msi/Package/Fragments/CustomActions.wxs
@@ -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>