1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Fixed Installer/Uninstaller

1. Remapped -fulluninstall to -funinstall
2. Updated behavior so db is not loaded if agent-installer is invoked
3. Renamed Windows Uninstaller from MeshCentralAgent to Mesh Agent for consistency
4. Update service-manager.installService(), such that if the service is the mesh agent, the windows uninstaller will invoke -fulluninstall
5. Updated agent-installer so that secondary agent and its scheduled tasks will be deleted on uninstall
6. Updated event-emitter, so if process.exit() is called on an emit(), it won't throw a catchable exception
This commit is contained in:
Bryan Roe
2020-04-07 00:03:11 -07:00
parent d1fcb0cd61
commit b8208f63ed
6 changed files with 123 additions and 52 deletions

View File

@@ -218,7 +218,7 @@ void WINAPI AddUninstallIcon()
int i;
HKEY hKey;
if (RegCreateKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MeshCentralAgent", &hKey) == ERROR_SUCCESS)
if (RegCreateKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Mesh Agent", &hKey) == ERROR_SUCCESS)
{
LPCTSTR str;
char targetexe[_MAX_PATH + 40];
@@ -953,7 +953,7 @@ int wmain(int argc, char* wargv[])
WideCharToMultiByte(CP_UTF8, 0, (LPCWCH)wargv[argvi], -1, argv[argvi], argvsz, NULL, NULL);
}
if (argc > 1 && (strcasecmp(argv[1], "-finstall") == 0 || strcasecmp(argv[1], "-funinstall") == 0))
if (argc > 1 && (strcasecmp(argv[1], "-finstall") == 0 || strcasecmp(argv[1], "-funinstall") == 0 || strcasecmp(argv[1], "-fulluninstall") == 0))
{
argv[argc] = argv[1];
argv[1] = (char*)ILibMemory_SmartAllocate(4);