From 7009324e7f31232d239830323dcab22fcf2312f8 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Tue, 6 Sep 2022 12:08:09 +0100 Subject: [PATCH] installer: SxS: WIP --- .../installer/CustomActions/CustomActions.cpp | 11 ++++- build/VStudio/installer/Product.wxs | 41 ++++++++++++++++++- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/build/VStudio/installer/CustomActions/CustomActions.cpp b/build/VStudio/installer/CustomActions/CustomActions.cpp index 6579ef06..2d5a355b 100644 --- a/build/VStudio/installer/CustomActions/CustomActions.cpp +++ b/build/VStudio/installer/CustomActions/CustomActions.cpp @@ -51,7 +51,14 @@ UINT __stdcall InstanceID(MSIHANDLE MsiHandle) SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond); - Sleep(1000); + + /* + * Sleep 1 second to ensure timestamp uniqueness. + * + * Note that this assumes that time is monotonic and users do not change time. + * Disable for now as it is assumed that the installation takes more than 1 second to complete. + */ + //Sleep(1000); WcaSetProperty(L"" __FUNCTION__, Result); @@ -79,7 +86,7 @@ UINT __stdcall ServiceRunning(MSIHANDLE MsiHandle) hr = WcaInitialize(MsiHandle, __FUNCTION__); ExitOnFailure(hr, "Failed to initialize"); - WcaGetProperty(L"" __FUNCTION__, &ServiceName); + hr = WcaGetProperty(L"" __FUNCTION__, &ServiceName); ExitOnFailure(hr, "Failed to get ServiceName"); WcaLog(LOGMSG_STANDARD, "Initialized: \"%S\"", ServiceName); diff --git a/build/VStudio/installer/Product.wxs b/build/VStudio/installer/Product.wxs index bf571b4a..65cf5498 100644 --- a/build/VStudio/installer/Product.wxs +++ b/build/VStudio/installer/Product.wxs @@ -29,7 +29,7 @@ - + NOT OLDVERSIONINSTALLED @@ -1020,8 +1020,11 @@ Value="WelcomeDlg" Order="10">NOT Installed - + + + + + + + + + + + + + ServiceRunning)]]> + + + ServiceRunning)]]> + + + + + + ServiceRunning)]]> + + + ServiceRunning)]]> + + +