|
@@ -2,7 +2,7 @@ unit IDE.FileAssocFunc;
|
|
|
|
|
|
{
|
|
{
|
|
Inno Setup
|
|
Inno Setup
|
|
- Copyright (C) 1997-2020 Jordan Russell
|
|
|
|
|
|
+ Copyright (C) 1997-2024 Jordan Russell
|
|
Portions by Martijn Laan
|
|
Portions by Martijn Laan
|
|
For conditions of distribution and use, see LICENSE.TXT.
|
|
For conditions of distribution and use, see LICENSE.TXT.
|
|
|
|
|
|
@@ -83,8 +83,6 @@ begin
|
|
SetKeyValue(Rootkey, 'Software\Classes\InnoSetupScriptFile\shell\Compile\command', nil,
|
|
SetKeyValue(Rootkey, 'Software\Classes\InnoSetupScriptFile\shell\Compile\command', nil,
|
|
'"' + SelfName + '" /cc "%1"');
|
|
'"' + SelfName + '" /cc "%1"');
|
|
|
|
|
|
- SetKeyValue(Rootkey, PChar('Software\Classes\Applications\' + PathExtractName(SelfName) + '\SupportedTypes'), '.iss', '');
|
|
|
|
-
|
|
|
|
{ If we just associated for all users, remove our existing association for the current user if it exists. }
|
|
{ If we just associated for all users, remove our existing association for the current user if it exists. }
|
|
if AllUsers then
|
|
if AllUsers then
|
|
UnregisterISSFileAssociationDo(HKEY_CURRENT_USER, False);
|
|
UnregisterISSFileAssociationDo(HKEY_CURRENT_USER, False);
|
|
@@ -144,7 +142,9 @@ var
|
|
SelfName: String;
|
|
SelfName: String;
|
|
NumSubkeys, NumValues: DWORD;
|
|
NumSubkeys, NumValues: DWORD;
|
|
begin
|
|
begin
|
|
- if not KeyExists(Rootkey, 'Software\Classes\InnoSetupScriptFile') and not KeyExists(Rootkey, 'Software\Classes\.iss') then
|
|
|
|
|
|
+ if not KeyExists(Rootkey, 'Software\Classes\InnoSetupScriptFile') and
|
|
|
|
+ not KeyExists(Rootkey, 'Software\Classes\.iss') and
|
|
|
|
+ not KeyExists(Rootkey, 'Software\Classes\Applications\Compil32.exe') then
|
|
Exit;
|
|
Exit;
|
|
|
|
|
|
SelfName := NewParamStr(0);
|
|
SelfName := NewParamStr(0);
|
|
@@ -176,6 +176,10 @@ begin
|
|
end;
|
|
end;
|
|
RegDeleteKeyIfEmpty(rvDefault, RootKey, 'Software\Classes\.iss');
|
|
RegDeleteKeyIfEmpty(rvDefault, RootKey, 'Software\Classes\.iss');
|
|
|
|
|
|
|
|
+ { Remove unnecessary key set by previous versions }
|
|
|
|
+ RegDeleteKeyIncludingSubkeys(rvDefault, Rootkey,
|
|
|
|
+ 'Software\Classes\Applications\Compil32.exe');
|
|
|
|
+
|
|
if ChangeNotify then
|
|
if ChangeNotify then
|
|
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
|
|
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
|
|
end;
|
|
end;
|