rustdesk/res/msi/CustomActions/Common.h
fufesou a686849bb6
fix: msi, delete service (#7867)
* fix: msi, delete service

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact: msi, replace 1060 to ERROR_SERVICE_DOES_NOT_EXIST

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-04-30 08:21:34 +08:00

18 lines
605 B
C++

#pragma once
#include <Windows.h>
#include <string>
bool AddFirewallRule(bool add, LPWSTR exeName, LPWSTR exeFile);
bool QueryServiceStatusExW(LPCWSTR serviceName, SERVICE_STATUS_PROCESS* status);
bool IsServiceRunningW(LPCWSTR serviceName);
bool MyCreateServiceW(LPCWSTR serviceName, LPCWSTR displayName, LPCWSTR binaryPath);
bool MyDeleteServiceW(LPCWSTR serviceName);
bool MyStartServiceW(LPCWSTR serviceName);
bool MyStopServiceW(LPCWSTR serviceName);
std::wstring ReadConfig(const std::wstring& filename, const std::wstring& key);
void UninstallDriver(LPCWSTR hardwareId, BOOL &rebootRequired);