38 lines
970 B
C++
38 lines
970 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <string>
|
|
|
|
namespace hook
|
|
{
|
|
inline constexpr wchar_t kConfigKey[] = L"Software\\Plandent\\MstscScriptHook";
|
|
|
|
struct LaunchConfig
|
|
{
|
|
std::wstring path;
|
|
std::wstring arguments;
|
|
std::wstring workingDirectory;
|
|
bool hidden = true;
|
|
bool preventDuplicates = true;
|
|
};
|
|
|
|
struct HookConfig
|
|
{
|
|
bool enabled = true;
|
|
bool enableLogging = true;
|
|
|
|
// Optionaler automatischer Start bei erfolgreicher RDP-Verbindung.
|
|
LaunchConfig connectProgram;
|
|
bool startOnConnect = true;
|
|
bool stopOnDisconnect = false;
|
|
|
|
// Optionaler Start, der durch PlandentRdpClientTrigger.exe auf dem
|
|
// Terminalserver über den Dynamic Virtual Channel ausgelöst wird.
|
|
bool triggerEnabled = false;
|
|
LaunchConfig triggerProgram;
|
|
};
|
|
|
|
HookConfig LoadConfig();
|
|
std::wstring ExpandEnvironment(const std::wstring& value);
|
|
}
|