From: cuz Date: Fri, 25 Mar 2005 22:25:10 +0000 (+0000) Subject: Check if the bin directory is already in the path X-Git-Tag: V2.12.0~422 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0e4dfc8bdd69ecbbf6f2bfa3ce3ec02c7ffa182;p=cc65 Check if the bin directory is already in the path git-svn-id: svn://svn.cc65.org/cc65/trunk@3417 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/packages/windows/install.vbs b/packages/windows/install.vbs index e8c601fa5..8d9494b9f 100644 --- a/packages/windows/install.vbs +++ b/packages/windows/install.vbs @@ -6,7 +6,7 @@ Option Explicit ' Variables must be declared explicitly ' Installer defaults. '****************************************************************************** const AppName = "cc65" -const Version = "2.10.1" +const Version = "2.10.5.20050325" const Installer = "cc65 Installer" const SpaceNeeded = 20 ' Free space needed on drive in MB const Shortcut = true ' Create shortcut on desktop @@ -591,7 +591,7 @@ function DirInPath (ByVal Dir) dim Path, Entries, I ' Get the path in lower case - Path = GetEnv ("%Path%") + Path = LCase (GetEnv ("%Path%")) ' Convert the directory to lower case Dir = LCase (Dir) @@ -1060,13 +1060,14 @@ sub AddEnvironment () call Abort (GetMsg ("MSG_REGWRITEERR")) end if - ' Add the bin directory to the path - call AddToSysPath (BinDir) - - ' Run the wm_settingchange program to notify other running programs - ' of the changed environment. Ignore errors. - call Run (BuildPath (BinDir, "wm_settingchange.exe"), 0) + ' Add the bin directory to the path if it's not already there + if not DirInPath (BinDir) then + call AddToSysPath (BinDir) + ' Run the wm_settingchange program to notify other running programs + ' of the changed environment. Ignore errors. + call Run (BuildPath (BinDir, "wm_settingchange.exe"), 0) + end if end sub