Skip to content

Instantly share code, notes, and snippets.

@Sopor
Last active January 30, 2026 15:50
Show Gist options
  • Select an option

  • Save Sopor/57f21eaa12be62b3592b0fdcf2477799 to your computer and use it in GitHub Desktop.

Select an option

Save Sopor/57f21eaa12be62b3592b0fdcf2477799 to your computer and use it in GitHub Desktop.

Revisions

  1. Sopor revised this gist Dec 31, 2024. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions totalcmdadm.cmd
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ SETLOCAL

    if /i %1==scheduler goto SCHEDULER

    echo %1 >%temp%\tcelevatedcmd.tmp
    echo %1 >%TEMP%\tcelevatedcmd.tmp

    "%SystemRoot%\System32\schtasks.exe" /run /tn "TotalCMDRunAdm"

    @@ -15,6 +15,4 @@ set /P startcmdpath=<%TEMP%\tcelevatedcmd.tmp

    "%APPDATA%\GHISLER\Command_Prompt.lnk" /K cd /d "%startcmdpath%"

    if EXIST "%temp%\tcelevatedcmd.tmp" DEL "%temp%\tcelevatedcmd.tmp"

    :END
  2. Sopor revised this gist Dec 31, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion totalcmdadm.cmd
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ if /i %1==scheduler goto SCHEDULER

    echo %1 >%temp%\tcelevatedcmd.tmp

    C:\Windows\System32\schtasks.exe /run /tn "TotalCMDRunAdm"
    "%SystemRoot%\System32\schtasks.exe" /run /tn "TotalCMDRunAdm"

    goto END

  3. Sopor revised this gist Dec 31, 2024. No changes.
  4. Sopor revised this gist Dec 31, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion totalcmdadm.cmd
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ if /i %1==scheduler goto SCHEDULER

    echo %1 >%temp%\tcelevatedcmd.tmp

    C:\Windows\System32\schtasks.exe /run /tn "MyApps\TotalCMDAsAdmin"
    C:\Windows\System32\schtasks.exe /run /tn "TotalCMDRunAdm"

    goto END

  5. Sopor created this gist Dec 31, 2024.
    20 changes: 20 additions & 0 deletions totalcmdadm.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    @echo off

    SETLOCAL

    if /i %1==scheduler goto SCHEDULER

    echo %1 >%temp%\tcelevatedcmd.tmp

    C:\Windows\System32\schtasks.exe /run /tn "MyApps\TotalCMDAsAdmin"

    goto END

    :SCHEDULER
    set /P startcmdpath=<%TEMP%\tcelevatedcmd.tmp

    "%APPDATA%\GHISLER\Command_Prompt.lnk" /K cd /d "%startcmdpath%"

    if EXIST "%temp%\tcelevatedcmd.tmp" DEL "%temp%\tcelevatedcmd.tmp"

    :END