CMDT - Ultra-lightweight Run-as-TrustedInstaller (Pure x64/x86 Assembly)

Discussion in 'MDL Projects and Applications' started by wesmar, Feb 6, 2026.

  1. KMPLAYER

    KMPLAYER MDL Member

    Jan 12, 2014
    110
    84
    10
  2. wesmar

    wesmar MDL Member

    Apr 1, 2012
    193
    676
    10
    I can see that the slider UAC is lowered, and when I run `cmdt_x64.exe` from the desktop without right-clicking and selecting "Run as administrator," it results in a 0xC00000FD exception—a stack overflow—after about 3 seconds. Thanks; I'm analyzing the loops.
     
  3. wesmar

    wesmar MDL Member

    Apr 1, 2012
    193
    676
    10
    Fixed it. I stress-tested both builds by bombarding them with theme-change messages, and the little guys survived, no crashes, no hangs. There will probably be some other things that I can't predict
     
  4. KMPLAYER

    KMPLAYER MDL Member

    Jan 12, 2014
    110
    84
    10
    @wesmar, I confirm that version 1.0.0.6 (18.07.2026) is now working correctly.

    jhh.png

    I have a question: Is it intentional that there are two spaces between CMDT ( ) v.1.0.0.6?! It's the same between: Author: ( ) Marek Wesolowski

    I always use only light theme. Sometimes this happens:

    jhh 1.png

    When starting cmdt_x64.exe and dragging some exe/cmd, sometimes cmdt_x64.exe spontaneously changes its own background to black, as if it spontaneously adopts a dark theme, which I never use. While writing, I found out why cmdt_x64.exe changes its background to black.

    Here's how to reproduce this problem: Start cmdt_x64.exe. Then minimize cmdt_x64.exe. As cmdt_x64.exe is minimized, click on cmdt_x64.exe in the toolbar. cmdt_x64.exe reappears, but the background of cmdt_x64.exe is now black.
     
  5. adric

    adric MDL Expert

    Jul 30, 2009
    1,536
    1,721
    60
  6. adric

    adric MDL Expert

    Jul 30, 2009
    1,536
    1,721
    60
    Confirmed.
     
  7. adric

    adric MDL Expert

    Jul 30, 2009
    1,536
    1,721
    60
    #88 adric, Jul 18, 2026 at 14:31
    Last edited: Jul 18, 2026 at 14:58
    I started testing cmdt with a simple batch file and found some discrepancies
    Code:
    @echo off
    net session
    netsession
    Without cmdt
    U:\SwApps\Tools4Maint\CmdElevation\CmdT\cmdt18_07_2026>tns.cmd
    There are no entries in the list.

    'netsession' is not recognized as an internal or external command,
    operable program or batch file.

    With cmdt

    U:\SwApps\Tools4Maint\CmdElevation\CmdT\cmdt18_07_2026>cmdt_x64 -cli tns.cmd
    'tns.cmd' is not recognized as an internal or external command,
    operable program or batch file.
     
  8. wesmar

    wesmar MDL Member

    Apr 1, 2012
    193
    676
    10
    Version 1.0.0.7 is out. The bug with switching to dark mode has been fixed; spacing is now calculated dynamically and is always consistent. A new option has been added to minimize the app to the system tray while holding down the Shift key.
    @adric - Do you mean merging stderr into stdout so that both are captured by a standard > redirection?
     
  9. adric

    adric MDL Expert

    Jul 30, 2009
    1,536
    1,721
    60
    #90 adric, Jul 18, 2026 at 15:50
    Last edited: Jul 18, 2026 at 16:36
    No. When cmdt tries to run an invalid cmd it does not show any output. Both stdout and stderr probably should be treated separately, the same way command prompt does it. Not sure if merging them in cmdt would have any adverse effects when using redirection. Your call.
    Code:
    c:\>net session >nul
    
    c:\>netsession >nul
    'netsession' is not recognized as an internal or external command,
    operable program or batch file.
    
    c:\>netsseion 2>nul
    
    c:\>
    
     
  10. wesmar

    wesmar MDL Member

    Apr 1, 2012
    193
    676
    10
    upload_2026-7-19_0-24-37.png
    Tomorrow, after testing, I'll upload it to GitHub and the website as version 1.0.0.8
     

    Attached Files:

  11. adric

    adric MDL Expert

    Jul 30, 2009
    1,536
    1,721
    60
    #92 adric, Jul 19, 2026 at 09:45
    Last edited: Jul 20, 2026 at 10:43
    Okay. Using cmd /c with -cli in a cmd prompt will show stderr, but won't if not added. As long as stderr shows up when using a batch file is fine with me.

    Note: The tns.cmd I posted now shows both stdout and stderr, but stderr does not show in the output file if redirection is used. The tns.txt output file only shows stdout: "There are no entries in the list"
    cmdt.png