From fce126ac759970b909c39c8ba47e3f2d9a60fbe3 Mon Sep 17 00:00:00 2001 From: zontreck Date: Mon, 22 Jul 2024 05:04:25 -0700 Subject: [PATCH] Temporarily remove the add/remove path options --- wininst.iss | 50 +------------------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/wininst.iss b/wininst.iss index 99bf858..55f3de6 100644 --- a/wininst.iss +++ b/wininst.iss @@ -11,50 +11,6 @@ #define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt -[Code] -procedure UpdatePathWithAppBin(); -var - PathVar: string; - BinPath: string; -begin - // Retrieve current PATH environment variable - PathVar := GetEnv('PATH'); - - // Construct the full path to the bin directory - BinPath := ExpandConstant('{app}\bin'); - - // Check if the bin directory is not already in PATH - if Pos(BinPath, PathVar) = 0 then - begin - // Append bin directory to PATH - if PathVar <> '' then - PathVar := PathVar + ';'; - PathVar := PathVar + BinPath; - - // Update the PATH environment variable - SetEnv('PATH', PathVar); - end; -end; -procedure RemovePathWithAppBin(); -var - PathVar: string; - BinPath: string; -begin - // Retrieve current PATH environment variable - PathVar := GetEnv('PATH'); - - // Construct the full path to the bin directory - BinPath := ExpandConstant('{app}\bin'); - - // Remove bin directory from PATH - PathVar := StringReplace(PathVar, BinPath + ';', '', [rfReplaceAll, rfIgnoreCase]); - PathVar := StringReplace(PathVar, BinPath, '', [rfReplaceAll, rfIgnoreCase]); - - // Update the PATH environment variable - SetEnv('PATH', PathVar); -end; - - [Setup] ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) @@ -113,8 +69,4 @@ Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent; AfterInstall: UpdatePathWithAppBin - - -[UninstallRun] -Filename: "{code:RemovePathWithAppBin}"; Flags: runhidden +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent