mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
installer: CustomActions: InstanceID
This commit is contained in:
parent
0b3ce52958
commit
9154ec784d
@ -25,6 +25,41 @@
|
|||||||
#include <wcautil.h>
|
#include <wcautil.h>
|
||||||
#include <strutil.h>
|
#include <strutil.h>
|
||||||
|
|
||||||
|
UINT __stdcall InstanceID(MSIHANDLE MsiHandle)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
WCHAR MessageBuf[64];
|
||||||
|
wsprintfW(MessageBuf, L"PID=%ld", GetCurrentProcessId());
|
||||||
|
MessageBoxW(0, MessageBuf, L"" __FUNCTION__ " Break", MB_OK);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
UINT err = ERROR_SUCCESS;
|
||||||
|
SYSTEMTIME SystemTime;
|
||||||
|
WCHAR Result[32+1];
|
||||||
|
|
||||||
|
hr = WcaInitialize(MsiHandle, __FUNCTION__);
|
||||||
|
ExitOnFailure(hr, "Failed to initialize");
|
||||||
|
|
||||||
|
WcaLog(LOGMSG_STANDARD, "Initialized");
|
||||||
|
|
||||||
|
GetSystemTime(&SystemTime);
|
||||||
|
wsprintfW(Result, L"%04u%02u%02uT%02u%02u%02uZ",
|
||||||
|
SystemTime.wYear,
|
||||||
|
SystemTime.wMonth,
|
||||||
|
SystemTime.wDay,
|
||||||
|
SystemTime.wHour,
|
||||||
|
SystemTime.wMinute,
|
||||||
|
SystemTime.wSecond);
|
||||||
|
Sleep(1000);
|
||||||
|
|
||||||
|
WcaSetProperty(L"" __FUNCTION__, Result);
|
||||||
|
|
||||||
|
LExit:
|
||||||
|
err = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
|
||||||
|
return WcaFinalize(err);
|
||||||
|
}
|
||||||
|
|
||||||
UINT __stdcall ServiceRunning(MSIHANDLE MsiHandle)
|
UINT __stdcall ServiceRunning(MSIHANDLE MsiHandle)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
EXPORTS
|
EXPORTS
|
||||||
|
InstanceID
|
||||||
ServiceRunning
|
ServiceRunning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user