File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1296,7 +1296,7 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Drive\shell\{#RegValu
1296
1296
#define Uninstall32RootKey " HKLM32"
1297
1297
#endif
1298
1298
1299
- Root : {#EnvironmentRootKey}; Subkey : " {#EnvironmentKey}" ; ValueType : expandsz ; ValueName : " Path" ; ValueData : " {olddata}; {app} \bin" ; Tasks: addtopath; Check : NeedsAddPath (ExpandConstant(' {app} \bin' ))
1299
+ Root : {#EnvironmentRootKey}; Subkey : " {#EnvironmentKey}" ; ValueType : expandsz ; ValueName : " Path" ; ValueData : " {code:AddToPath| {app} \bin} " ; Tasks: addtopath; Check : NeedsAddToPath (ExpandConstant(' {app} \bin' ))
1300
1300
1301
1301
[Code]
1302
1302
function IsBackgroundUpdate (): Boolean;
@@ -1553,7 +1553,7 @@ begin
1553
1553
until Length(Text)=0 ;
1554
1554
end ;
1555
1555
1556
- function NeedsAddPath (Param : string): boolean;
1556
+ function NeedsAddToPath (VSCode : string): boolean;
1557
1557
var
1558
1558
OrigPath: string;
1559
1559
begin
@@ -1562,7 +1562,19 @@ begin
1562
1562
Result := True;
1563
1563
exit;
1564
1564
end ;
1565
- Result := Pos(' ;' + Param + ' ;' , ' ;' + OrigPath + ' ;' ) = 0 ;
1565
+ Result := Pos(' ;' + VSCode + ' ;' , ' ;' + OrigPath + ' ;' ) = 0 ;
1566
+ end ;
1567
+
1568
+ function AddToPath (VSCode: string): string;
1569
+ var
1570
+ OrigPath: string;
1571
+ begin
1572
+ RegQueryStringValue({ #EnvironmentRootKey} , ' {#EnvironmentKey}' , ' Path' , OrigPath)
1573
+
1574
+ if (Length(OrigPath) > 0 ) and (OrigPath[Length(OrigPath)] = ' ;' ) then
1575
+ Result := OrigPath + VSCode
1576
+ else
1577
+ Result := OrigPath + ' ;' + VSCode
1566
1578
end ;
1567
1579
1568
1580
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
You can’t perform that action at this time.
0 commit comments