master
h 35 lines 979 Bytes
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 install.h
8
9 Abstract:
10
11 This file contains MSI/Wintrust install helper function declarations.
12
13 --*/
14
15 #pragma once
16 #include <functional>
17
18 namespace wsl::windows::common::install {
19
20 int CallMsiPackage();
21
22 void MsiMessageCallback(INSTALLMESSAGE type, LPCWSTR message);
23
24 wil::unique_hfile ValidateFileSignature(LPCWSTR Path);
25
26 // Setting CallerOwnsProcess to false will prevent this function from making process wide changes or printing output.
27 int UpdatePackage(bool PreRelease, bool Repair, bool CallerOwnsProcess = true);
28
29 UINT UpgradeViaMsi(_In_ LPCWSTR PackageLocation, _In_opt_ LPCWSTR ExtraArgs, _In_opt_ LPCWSTR LogFile, _In_ const std::function<void(INSTALLMESSAGE, LPCWSTR)>& callback);
30
31 UINT UninstallViaMsi(_In_opt_ LPCWSTR LogFile, _In_ const std::function<void(INSTALLMESSAGE, LPCWSTR)>& callback);
32
33 void WriteInstallLog(const std::string& Content);
34
35 } // namespace wsl::windows::common::install