diff -ruN oxy_src/OxygenBasic/demos/GL/ConsoleG/ConsoleCommand.o2bas oxy_work/OxygenBasic_reviewed/demos/GL/ConsoleG/ConsoleCommand.o2bas
--- oxy_src/OxygenBasic/demos/GL/ConsoleG/ConsoleCommand.o2bas	2018-08-30 17:27:48.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/demos/GL/ConsoleG/ConsoleCommand.o2bas	2026-04-13 21:37:46.196481861 +0000
@@ -14,10 +14,14 @@
   static STARTUPINFO         infs
   static PROCESS_INFORMATION infp
   if s then c="cmd.exe /c " else c="cmd.exe "
-  CreateProcess null,c+s,0,0,0,0,0,0,@infs,@infp
-  WaitForMultipleObjects 1,@infp.hthread,1,-1
-  CloseHandle infp.hProcess
-  CloseHandle infp.hThread
+  RtlZeroMemory @infs, sizeof(STARTUPINFO)
+  RtlZeroMemory @infp, sizeof(PROCESS_INFORMATION)
+  infs.cb=sizeof(STARTUPINFO)
+  if CreateProcess(null,c+s,0,0,0,0,0,0,@infs,@infp)
+    WaitForSingleObject infp.hProcess,-1
+    CloseHandle infp.hProcess
+    CloseHandle infp.hThread
+  endif
   end function
 
 
diff -ruN oxy_src/OxygenBasic/demos/GL/Grafide/GrafideGUI.inc oxy_work/OxygenBasic_reviewed/demos/GL/Grafide/GrafideGUI.inc
--- oxy_src/OxygenBasic/demos/GL/Grafide/GrafideGUI.inc	2023-11-09 09:57:00.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/demos/GL/Grafide/GrafideGUI.inc	2026-04-13 21:37:46.197473992 +0000
@@ -488,18 +488,18 @@
       if sp
         SetCurrentDirectory(sp)
       endif
-      string f=qu+trimpath(cf)+qu
-      if right(cf,6)=".o2bas"
+      string f=trimpath(cf)
+      if lcase(right(cf,6))=".o2bas"
         'Exec(sd+"\co2.exe "+f,0) 'assume co2 path
         'grafide
         string sc
         sc=AppExePath()
         QuExec(sc+"co2.exe","",f)
         SetWindowText hwnd, cf " Exec"
-      elseif right(cf,4)=".bat"
-        DOS(f,0)
+      elseif lcase(right(cf,4))=".bat"
+        DOS(qu+f+qu,0)
         SetWindowText hwnd, cf " Exec"
-      elseif right(cf,4)=".obj"
+      elseif lcase(right(cf,4))=".obj"
         #ifdef ObjFileName
           ObjFileName=trimpath(cf)
           'EXEC FROM FILE
diff -ruN oxy_src/OxygenBasic/demos/System/CustomConsole.o2bas oxy_work/OxygenBasic_reviewed/demos/System/CustomConsole.o2bas
--- oxy_src/OxygenBasic/demos/System/CustomConsole.o2bas	2024-07-24 20:47:06.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/demos/System/CustomConsole.o2bas	2026-04-13 21:37:46.198337873 +0000
@@ -29,9 +29,14 @@
   STARTUPINFO infs
   PROCESS_INFORMATION infp
   if s then c="cmd.exe /c" else c="cmd.exe"
-  CreateProcess null,c+" "+s,0,0,0,0,0,0,@infs,@infp
-  CloseHandle infp.hProcess
-  CloseHandle infp.hThread
+  RtlZeroMemory @infs, sizeof(STARTUPINFO)
+  RtlZeroMemory @infp, sizeof(PROCESS_INFORMATION)
+  infs.cb=sizeof(STARTUPINFO)
+  if CreateProcess(null,c+" "+s,0,0,0,0,0,0,@infs,@infp)
+    WaitForSingleObject infp.hProcess,-1
+    CloseHandle infp.hProcess
+    CloseHandle infp.hThread
+  endif
   end function
   
 
diff -ruN oxy_src/OxygenBasic/inc/SearchUtil.inc oxy_work/OxygenBasic_reviewed/inc/SearchUtil.inc
--- oxy_src/OxygenBasic/inc/SearchUtil.inc	2024-07-30 12:43:52.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/SearchUtil.inc	2026-04-13 21:37:46.199065244 +0000
@@ -317,7 +317,7 @@
   '
   h=FindFirstFile filter, @f
   '
-  if h then
+  if h<>INVALID_HANDLE_VALUE
     do
       a=0
       if not wordlist then
diff -ruN oxy_src/OxygenBasic/inc/SysUtil.inc oxy_work/OxygenBasic_reviewed/inc/SysUtil.inc
--- oxy_src/OxygenBasic/inc/SysUtil.inc	2025-10-14 08:22:16.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/SysUtil.inc	2026-04-13 21:37:46.199604127 +0000
@@ -67,7 +67,7 @@
   '
   h=FindFirstFile filter, @f
   count=0
-  if h then
+  if h<>INVALID_HANDLE_VALUE
     do
       a=0
       if f.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY
@@ -152,12 +152,20 @@
 
   function AppExePath(int n=0) as string
   ======================================
-  static byte b[512]
-  int i=GetModuleFileName(GetModuleHandle(0), @b, 512)
-  while b[i] != 0x5c '92 '\'
+  static byte b[4096]
+  int i=GetModuleFileName(GetModuleHandle(0), @b, 4096)
+  if i<=0 then return ""
+  if i>4095 then i=4095
+  b[i]=0
+  while i>0 and b[i] != 0x5c and b[i] != 0x2f '92 '\' 47 '/'
     i--
   wend
-  if not n then i++ 'include the '\' by default
+  if i=0 and b[i] != 0x5c and b[i] != 0x2f
+    char bc at @b
+    function=bc
+    exit function
+  endif
+  if i>0 and not n then i++ 'include the '\' by default
   b[i]=0
   '= @b 'low level
   char bc at @b
@@ -167,8 +175,8 @@
 
   function CurDir() as string
   ===========================
-  char s[256]
-  GetCurrentDirectory 256, s
+  char s[4096]
+  GetCurrentDirectory 4096, s
   return s
   end function
 
@@ -182,20 +190,31 @@
   ===================================================
   STARTUPINFO infs
   PROCESS_INFORMATION infp
-  CreateProcess null,c,0,0,0,flags,0,0,@infs,@infp
+  RtlZeroMemory @infs, sizeof(STARTUPINFO)
+  RtlZeroMemory @infp, sizeof(PROCESS_INFORMATION)
+  infs.cb=sizeof(STARTUPINFO)
+  if CreateProcess(null,c,0,0,0,flags,0,0,@infs,@infp)=0
+    return -GetLastError()
+  endif
   if wait
-    WaitForMultipleObjects 1,@infp.hthread,1,-1
-  end if
-  GetExitCodeProcess(infp.hProcess,@function)
-  CloseHandle infp.hProcess
-  CloseHandle infp.hThread
-  return 0
+    WaitForSingleObject infp.hProcess,-1
+    if GetExitCodeProcess(infp.hProcess,@function)=0
+      function=-GetLastError()
+    endif
+  else
+    function=0
+  endif
+  if infp.hProcess then CloseHandle infp.hProcess
+  if infp.hThread then CloseHandle infp.hThread
   end function
 
 
   function QuExec(string c,d,f, int wait=0,flags=0) as int
   ========================================================
-    return Exec(qu+c+qu+" "+d+" "+qu+f+qu, wait,flags)
+    string s=qu+c+qu
+    if d then s+=" "+d
+    if f then s+=" "+qu+f+qu
+    return Exec(s, wait,flags)
   end function
   
 
diff -ruN oxy_src/OxygenBasic/inc/WinData.inc oxy_work/OxygenBasic_reviewed/inc/WinData.inc
--- oxy_src/OxygenBasic/inc/WinData.inc	2024-06-27 05:54:34.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/WinData.inc	2026-04-13 21:37:46.200526552 +0000
@@ -1059,7 +1059,7 @@
 
   % MAX_PATH             260
   % ERROR_NO_MORE_FILES  18
-  % INVALID_HANDLE_VALUE 0
+  % INVALID_HANDLE_VALUE -1
 
   typedef bool    BOOL
   typedef byte    BYTE  
diff -ruN oxy_src/OxygenBasic/inc/WinUtil.inc oxy_work/OxygenBasic_reviewed/inc/WinUtil.inc
--- oxy_src/OxygenBasic/inc/WinUtil.inc	2025-05-15 09:35:00.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/WinUtil.inc	2026-04-13 21:37:46.201168854 +0000
@@ -289,12 +289,20 @@
 
   function AppExePath(int n=0) as string
   ======================================
-  static byte b[512]
-  int i=GetModuleFileName(GetModuleHandle(0), @b, 512)
-  while b[i] != 0x5c '92 '\'
+  static byte b[4096]
+  int i=GetModuleFileName(GetModuleHandle(0), @b, 4096)
+  if i<=0 then return ""
+  if i>4095 then i=4095
+  b[i]=0
+  while i>0 and b[i] != 0x5c and b[i] != 0x2f '92 '\' 47 '/'
     i--
   wend
-  if not n then i++ 'include the '\' by default
+  if i=0 and b[i] != 0x5c and b[i] != 0x2f
+    char bc at @b
+    function=bc
+    exit function
+  endif
+  if i>0 and not n then i++ 'include the '\' by default
   b[i]=0
   '= @b 'low level
   char bc at @b
diff -ruN oxy_src/OxygenBasic/inc/WindataW.inc oxy_work/OxygenBasic_reviewed/inc/WindataW.inc
--- oxy_src/OxygenBasic/inc/WindataW.inc	2024-06-27 05:55:10.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/WindataW.inc	2026-04-13 21:37:46.202009437 +0000
@@ -1047,7 +1047,7 @@
 
   % MAX_PATH             260
   % ERROR_NO_MORE_FILES  18
-  % INVALID_HANDLE_VALUE 0
+  % INVALID_HANDLE_VALUE -1
 
   typedef bool    BOOL
   typedef byte    BYTE  
diff -ruN oxy_src/OxygenBasic/inc/self/co2m64.o2bas oxy_work/OxygenBasic_reviewed/inc/self/co2m64.o2bas
--- oxy_src/OxygenBasic/inc/self/co2m64.o2bas	2025-10-15 14:27:22.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/self/co2m64.o2bas	2026-04-13 21:37:46.202592769 +0000
@@ -30,14 +30,15 @@
   StrBuffer pr
 
   sys    a,i
-  string s,t,u
+  string s,sl,t,u
   sys    swa,swc,swl,swm,swr,sws  'COMPILER SWITCHES
   string fname,mname,xname    'SOURCE FILE NAME COMPONENTS
   string bfname,bmname,rfname 'PE FILE NAME COMPONENTS
   string er                   'ERROR MESSAGES
   '
 
-  s=lcase CommandLineArgs()  
+  s=CommandLineArgs()
+  sl=lcase s
 
   if not s then goto nofile
   '
@@ -45,9 +46,9 @@
   '========
   i=0
   do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     if ascb<>45 then exit do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     select ascb
     case "i" : swa=ascb '-i intermediate output
     case "a" : swa=ascb '-a asm output
@@ -62,6 +63,7 @@
   end do
   '
   s=mid(s,i)
+  sl=mid(sl,i)
   '
   nofile: 'check
   '=============
@@ -91,13 +93,13 @@
   i=1
   s2=getword(s,i)
   s2=unquote(s2)
-  s3=right(s2,6)
+  s3=lcase right(s2,6)
   a=len(s2)
   if s3=".o2bas"
     fname=s2
     a-=6
   else
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".bas"
       fname=s2
       a-=4
@@ -113,7 +115,7 @@
     if lenw=0
       exit do
     endif
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".exe"
       bfname=s2
       swl=0
diff -ruN oxy_src/OxygenBasic/inc/self/co2m641.o2bas oxy_work/OxygenBasic_reviewed/inc/self/co2m641.o2bas
--- oxy_src/OxygenBasic/inc/self/co2m641.o2bas	2025-10-15 14:28:12.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/inc/self/co2m641.o2bas	2026-04-13 21:37:46.203178958 +0000
@@ -30,13 +30,14 @@
   StrBuffer pr
 
   sys    a,i
-  string s,t,u
+  string s,sl,t,u
   sys    swa,swc,swl,swm,swr,sws  'COMPILER SWITCHES
   string fname,mname,xname    'SOURCE FILE NAME COMPONENTS
   string bfname,bmname,rfname 'PE FILE NAME COMPONENTS
   string er                   'ERROR MESSAGES
   '
-  s=lcase CommandLineArgs()  
+  s=CommandLineArgs()
+  sl=lcase s
 
   if not s then goto nofile
   '
@@ -44,9 +45,9 @@
   '========
   i=0
   do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     if ascb<>45 then exit do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     select ascb
     case "i" : swa=ascb '-i intermediate output
     case "a" : swa=ascb '-a asm output
@@ -61,6 +62,7 @@
   end do
   '
   s=mid(s,i)
+  sl=mid(sl,i)
   '
   nofile: 'check
   '=============
@@ -90,13 +92,13 @@
   i=1
   s2=getword(s,i)
   s2=unquote(s2)
-  s3=right(s2,6)
+  s3=lcase right(s2,6)
   a=len(s2)
   if s3=".o2bas"
     fname=s2
     a-=6
   else
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".bas"
       fname=s2
       a-=4
@@ -112,7 +114,7 @@
     if lenw=0
       exit do
     endif
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".exe"
       bfname=s2
       swl=0
diff -ruN oxy_src/OxygenBasic/tools/FindEd.o2bas oxy_work/OxygenBasic_reviewed/tools/FindEd.o2bas
--- oxy_src/OxygenBasic/tools/FindEd.o2bas	2024-01-09 22:31:20.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/tools/FindEd.o2bas	2026-04-13 21:37:46.203800712 +0000
@@ -277,13 +277,13 @@
           SetCurrentDirectory(sp)
         endif
         string f=trimpath(cf)
-        if right(cf,6)=".o2bas"
+        if lcase(right(cf,6))=".o2bas"
           string sc
           sc=AppExePath()
           QuExec(sc+"co2.exe","",f)
           SetWindowText hwnd, cf " Exec"
-        elseif right(cf,4)=".bat"
-          DOS(f,0)
+        elseif lcase(right(cf,4))=".bat"
+          DOS(qu+f+qu,0)
           SetWindowText hwnd, cf " Exec"
         endif
         SetCurrentDirectory(sd)
diff -ruN oxy_src/OxygenBasic/tools/Peroxide.o2bas oxy_work/OxygenBasic_reviewed/tools/Peroxide.o2bas
--- oxy_src/OxygenBasic/tools/Peroxide.o2bas	2025-03-01 01:46:34.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/tools/Peroxide.o2bas	2026-04-13 21:37:46.204414445 +0000
@@ -541,13 +541,13 @@
         SetCurrentDirectory(sp)
       endif
       string f=trimpath(cf)
-      if right(cf,6)=".o2bas"
+      if lcase(right(cf,6))=".o2bas"
         string sc
         sc=AppExePath()
         QuExec(sc+"co2.exe","",f)
         SetWindowText hwnd, cf " Exec"
-      elseif right(cf,4)=".bat"
-        DOS(f,0)
+      elseif lcase(right(cf,4))=".bat"
+        DOS(qu+f+qu,0)
         SetWindowText hwnd, cf " Exec"
       endif
       SetCurrentDirectory(sd)
@@ -583,13 +583,13 @@
         SetCurrentDirectory(sp)
       endif
       string f=trimpath(cf)
-      if right(cf,6)=".o2bas"
+      if lcase(right(cf,6))=".o2bas"
         string sc
         sc=AppExePath()
         QuExec(sc+"co2m64.exe","",f)
         SetWindowText hwnd, cf " Exec"
-      elseif right(cf,4)=".bat"
-        DOS(f,0)
+      elseif lcase(right(cf,4))=".bat"
+        DOS(qu+f+qu,0)
         SetWindowText hwnd, cf " Exec"
       endif
       SetCurrentDirectory(sd)
diff -ruN oxy_src/OxygenBasic/tools/co2.o2bas oxy_work/OxygenBasic_reviewed/tools/co2.o2bas
--- oxy_src/OxygenBasic/tools/co2.o2bas	2026-02-09 14:34:14.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/tools/co2.o2bas	2026-04-13 21:37:46.205013993 +0000
@@ -33,7 +33,7 @@
   StrBuffer pr
 
   sys    a,i
-  string s,t,u
+  string s,sl,t,u
   sys    swa,swc,swl,swm,swr,sws  'COMPILER SWITCHES
   string fname,mname,xname    'SOURCE FILE NAME COMPONENTS
   string bfname,bmname,rfname 'PE FILE NAME COMPONENTS
@@ -43,7 +43,8 @@
   int utfc=248 'embedded unicode mark
   '
 
-  s=lcase CommandLineArgs()  
+  s=CommandLineArgs()
+  sl=lcase s
 
   if not s then goto nofile
   '
@@ -51,9 +52,9 @@
   '========
   i=0
   do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     if ascb<>45 then exit do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     select ascb
     case "i" : swa=ascb '-i intermediate output
     case "a" : swa=ascb '-a asm output
@@ -69,6 +70,7 @@
   end do
   '
   s=mid(s,i)
+  sl=mid(sl,i)
   '
   nofile: 'check
   '=============
@@ -99,13 +101,13 @@
   i=1
   s2=getword(s,i)
   s2=unquote(s2)
-  s3=right(s2,6)
+  s3=lcase right(s2,6)
   a=len(s2)
   if s3=".o2bas"
     fname=s2
     a-=6
   else
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".bas"
       fname=s2
       a-=4
@@ -126,7 +128,7 @@
     if lenw=0
       exit do
     endif
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".exe"
       bfname=s2
       swl=0
diff -ruN oxy_src/OxygenBasic/tools/co2m64.o2bas oxy_work/OxygenBasic_reviewed/tools/co2m64.o2bas
--- oxy_src/OxygenBasic/tools/co2m64.o2bas	2026-02-09 14:31:54.000000000 +0000
+++ oxy_work/OxygenBasic_reviewed/tools/co2m64.o2bas	2026-04-13 21:37:46.205459067 +0000
@@ -33,13 +33,14 @@
   StrBuffer pr
 
   sys    a,i
-  string s,t,u
+  string s,sl,t,u
   sys    swa,swc,swl,swm,swr,sws  'COMPILER SWITCHES
   string fname,mname,xname    'SOURCE FILE NAME COMPONENTS
   string bfname,bmname,rfname 'PE FILE NAME COMPONENTS
   string er                   'ERROR MESSAGES
   '
-  s=lcase CommandLineArgs()  
+  s=CommandLineArgs()
+  sl=lcase s
 
   if not s then goto nofile
   '
@@ -47,9 +48,9 @@
   '========
   i=0
   do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     if ascb<>45 then exit do
-    i++ : skiplspace s,i
+    i++ : skiplspace sl,i
     select ascb
     case "i" : swa=ascb '-i intermediate output
     case "a" : swa=ascb '-a asm output
@@ -65,6 +66,7 @@
   end do
   '
   s=mid(s,i)
+  sl=mid(sl,i)
   '
   nofile: 'check
   '=============
@@ -95,13 +97,13 @@
   i=1
   s2=getword(s,i)
   s2=unquote(s2)
-  s3=right(s2,6)
+  s3=lcase right(s2,6)
   a=len(s2)
   if s3=".o2bas"
     fname=s2
     a-=6
   else
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".bas"
       fname=s2
       a-=4
@@ -122,7 +124,7 @@
     if lenw=0
       exit do
     endif
-    s3=right(s2,4)
+    s3=lcase right(s2,4)
     if s3=".exe"
       bfname=s2
       swl=0
