mirror of
https://github.com/greenshot/greenshot
synced 2025-07-31 12:10:15 -07:00
Rename of DropBox to Dropbox, also added logic to find as many Greenshots to deinstall as possible!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1870 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ce1193ce9d
commit
a6750c1dbe
1 changed files with 27 additions and 17 deletions
|
@ -184,7 +184,7 @@ Name: "plugins\confluence"; Description: {cm:confluence}; Types: Full; Check: ha
|
|||
Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: Full
|
||||
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: Full
|
||||
Name: "plugins\box"; Description: "Box Plugin"; Types: Full; Check: hasNET35()
|
||||
Name: "plugins\dropbox"; Description: "DropBox Plugin"; Types: Full; Check: hasNET35()
|
||||
Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: Full; Check: hasNET35()
|
||||
Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: Full
|
||||
Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: Full
|
||||
Name: "languages"; Description: {cm:language}; Types: Full
|
||||
|
@ -226,9 +226,11 @@ var
|
|||
begin
|
||||
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
|
||||
sUnInstallString := '';
|
||||
// Retrieve uninstall string from HKLM or HKCU
|
||||
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
|
||||
// Retrieve uninstall string from HKLM(32/64) or HKCU(32/64)
|
||||
if not RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||
if not RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||
if not RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||
RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString);
|
||||
Result := sUnInstallString;
|
||||
end;
|
||||
|
||||
|
@ -243,6 +245,7 @@ end;
|
|||
function UnInstallOldVersion(): Integer;
|
||||
var
|
||||
sUnInstallString: String;
|
||||
iTries: Integer;
|
||||
iResultCode: Integer;
|
||||
begin
|
||||
// Return Values:
|
||||
|
@ -252,20 +255,27 @@ begin
|
|||
|
||||
// default return value
|
||||
Result := 0;
|
||||
iTries := 5;
|
||||
|
||||
// get the uninstall string of the old app
|
||||
sUnInstallString := GetUninstallString();
|
||||
if sUnInstallString <> '' then
|
||||
begin
|
||||
sUnInstallString := RemoveQuotes(sUnInstallString);
|
||||
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
||||
Result := 3
|
||||
else
|
||||
Result := 2;
|
||||
// Wait a few seconds to prevent installation issues, otherwise files are removed in one process while the other tries to link to them
|
||||
Sleep(2000);
|
||||
end else
|
||||
Result := 1;
|
||||
// Uninstall while we find a uninstall string
|
||||
while (Result <> 1) or (iTries = 0) do begin
|
||||
iTries := iTries - 1;
|
||||
// get the uninstall string of the old app
|
||||
sUnInstallString := GetUninstallString();
|
||||
if sUnInstallString <> '' then
|
||||
begin
|
||||
sUnInstallString := RemoveQuotes(sUnInstallString);
|
||||
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
||||
Result := 3
|
||||
else
|
||||
Result := 2;
|
||||
// Wait a few seconds to prevent installation issues, otherwise files are removed in one process while the other tries to link to them
|
||||
Sleep(2000);
|
||||
end else
|
||||
begin
|
||||
Result := 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue