-
Notifications
You must be signed in to change notification settings - Fork 15
/
AppInstaller.h
27 lines (23 loc) · 1.01 KB
/
AppInstaller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#pragma comment(lib, "comctl32.lib")
#pragma comment( \
linker, \
"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include <string>
#include <windows.h>
#define INSTALL_BUTTON_ID 1000
#define RUN_ONCE_BUTTON_ID 1001
#define UNINSTALL_BUTTON_ID 1002
class AppInstaller {
public:
static void Install();
static void Uninstall();
static BOOL IsAppInstalled();
static int ShowInstallerTaskDialog();
static BOOL IsAppStartedFromLocalAppDataFolder();
private:
static BOOL AppExecutableExists();
static PWSTR GetAppLocalFolderPath();
static void KillAppProcess();
static std::wstring GetCurrentProcessExecutablePath();
};