Files
Sourcetrail/deployment/windows/wixSetup/Setup/src/main.cpp
T
Manuel Dobusch d0cf500c8e build: new windows installer
Created new windows installer based on the WiX Toolset
2016-08-09 16:32:27 +02:00

23 lines
570 B
C++

#include <iostream>
#include <windows.h>
int main()
{
HKEY hKey;
LONG lResult = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Coati Software OG\\Coati\\coatiSoftwareAppData"), 0, KEY_READ, &hKey);
if (lResult == ERROR_SUCCESS)
{
std::cout << "Coati found" << std::endl;
std::cout << "Performing upgrade" << std::endl;
system("msiexec /i coati.msi REINSTALL=ALL REINSTALLMODE=vomus");
}
else
{
std::cout << "Coati not found" << std::endl;
std::cout << "Performing initial installation" << std::endl;
system("msiexec /i coati.msi");
}
return 0;
}