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\externalcommand"; Description: {cm:externalcommand}; Types: Full
|
||||||
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: Full
|
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: Full
|
||||||
Name: "plugins\box"; Description: "Box Plugin"; Types: Full; Check: hasNET35()
|
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\flickr"; Description: "Flickr Plugin"; Types: Full
|
||||||
Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: Full
|
Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: Full
|
||||||
Name: "languages"; Description: {cm:language}; Types: Full
|
Name: "languages"; Description: {cm:language}; Types: Full
|
||||||
|
@ -226,9 +226,11 @@ var
|
||||||
begin
|
begin
|
||||||
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
|
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
|
||||||
sUnInstallString := '';
|
sUnInstallString := '';
|
||||||
// Retrieve uninstall string from HKLM or HKCU
|
// Retrieve uninstall string from HKLM(32/64) or HKCU(32/64)
|
||||||
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
|
if not RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||||
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
|
if not RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||||
|
if not RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||||
|
RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString);
|
||||||
Result := sUnInstallString;
|
Result := sUnInstallString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -243,6 +245,7 @@ end;
|
||||||
function UnInstallOldVersion(): Integer;
|
function UnInstallOldVersion(): Integer;
|
||||||
var
|
var
|
||||||
sUnInstallString: String;
|
sUnInstallString: String;
|
||||||
|
iTries: Integer;
|
||||||
iResultCode: Integer;
|
iResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
// Return Values:
|
// Return Values:
|
||||||
|
@ -252,20 +255,27 @@ begin
|
||||||
|
|
||||||
// default return value
|
// default return value
|
||||||
Result := 0;
|
Result := 0;
|
||||||
|
iTries := 5;
|
||||||
|
|
||||||
// get the uninstall string of the old app
|
// Uninstall while we find a uninstall string
|
||||||
sUnInstallString := GetUninstallString();
|
while (Result <> 1) or (iTries = 0) do begin
|
||||||
if sUnInstallString <> '' then
|
iTries := iTries - 1;
|
||||||
begin
|
// get the uninstall string of the old app
|
||||||
sUnInstallString := RemoveQuotes(sUnInstallString);
|
sUnInstallString := GetUninstallString();
|
||||||
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
if sUnInstallString <> '' then
|
||||||
Result := 3
|
begin
|
||||||
else
|
sUnInstallString := RemoveQuotes(sUnInstallString);
|
||||||
Result := 2;
|
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
||||||
// Wait a few seconds to prevent installation issues, otherwise files are removed in one process while the other tries to link to them
|
Result := 3
|
||||||
Sleep(2000);
|
else
|
||||||
end else
|
Result := 2;
|
||||||
Result := 1;
|
// 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;
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue