Skip to content

Instantly share code, notes, and snippets.

@a-chen
Last active July 20, 2017 02:56
Show Gist options
  • Select an option

  • Save a-chen/7c6fcccae8ff08c963e6ba553fb1e3c3 to your computer and use it in GitHub Desktop.

Select an option

Save a-chen/7c6fcccae8ff08c963e6ba553fb1e3c3 to your computer and use it in GitHub Desktop.

Revisions

  1. a-chen revised this gist Jul 20, 2017. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions install-cmder.bat
    Original file line number Diff line number Diff line change
    @@ -32,8 +32,6 @@ rem Below instructions for adding to Windows Start Menu
    @echo ll=ls -lh --show-control-chars -F --color $*
    @echo gs=git status



    pause >nul
    exit

  2. a-chen revised this gist Jul 20, 2017. 1 changed file with 12 additions and 6 deletions.
    18 changes: 12 additions & 6 deletions install-cmder.bat
    Original file line number Diff line number Diff line change
    @@ -18,15 +18,21 @@ start .

    rem Below instructions for adding to Windows Start Menu
    @echo Perform the following if you want to add Cmder to be searchable via search
    @echo Right click Cmder.exe, click "Create shortcut"
    @echo Move the shortcut to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    @echo And you're done!
    @echo Right click Cmder.exe, click "Create shortcut"
    @echo Move the shortcut to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    @echo And you're done!

    @echo To get aliases working in Windows 10
    @echo Open CMD window: Win+S and search for cmd(Command Prompt)
    @echo Right Click on the window title and select Properties
    @echo Check the use legacy option

    @echo Optional aliases
    @echo Add the below lines to /tools/Cmder/config/user-aliases.cmd after running installing Cmder
    @echo Add the below lines to /tools/Cmder/config/user-aliases.cmd after running installing Cmder
    @echo ll=ls -lh --show-control-chars -F --color $*
    @echo gs=git status


    @echo ll=ls -lh --show-control-chars -F --color $*
    @echo gs=git status

    pause >nul
    exit
  3. a-chen revised this gist Jul 14, 2017. 2 changed files with 6 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions custom-aliases.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    # Custom aliases
    # Add the below lines to /tools/Cmder/config/user-aliases.cmd after running installing Cmder

    ll=ls -lh --show-control-chars -F --color $*
    gs=git status
    6 changes: 6 additions & 0 deletions install-cmder.bat
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,12 @@ rem Below instructions for adding to Windows Start Menu
    @echo Move the shortcut to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    @echo And you're done!

    @echo Optional aliases
    @echo Add the below lines to /tools/Cmder/config/user-aliases.cmd after running installing Cmder

    @echo ll=ls -lh --show-control-chars -F --color $*
    @echo gs=git status

    pause >nul
    exit

  4. a-chen revised this gist Jul 14, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion custom-aliases.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Custom aliases
    # Add the below lines to /tools/Cmder/config/user-aliases.cmd
    # Add the below lines to /tools/Cmder/config/user-aliases.cmd after running installing Cmder

    ll=ls -lh --show-control-chars -F --color $*
    gs=git status
  5. a-chen revised this gist Jul 14, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions custom-aliases.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Custom aliases
    # Add the below lines to /tools/Cmder/config/user-aliases.cmd

    ll=ls -lh --show-control-chars -F --color $*
    gs=git status
  6. a-chen revised this gist Jul 14, 2017. No changes.
  7. a-chen created this gist Jul 14, 2017.
    38 changes: 38 additions & 0 deletions install-cmder.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    @echo off

    goto check_permissions

    :install
    rem Installs Chocolatey package manager
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

    rem Installs cmder
    choco install cmder -y

    cd /tools/cmder

    rem Adds Cmder to right click context menu
    cmder.exe /REGISTER ALL

    start .

    rem Below instructions for adding to Windows Start Menu
    @echo Perform the following if you want to add Cmder to be searchable via search
    @echo Right click Cmder.exe, click "Create shortcut"
    @echo Move the shortcut to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    @echo And you're done!

    pause >nul
    exit

    :check_permissions
    echo Administrative permissions required. Checking permissions...

    net session >nul 2>&1
    if %errorLevel% == 0 (
    echo Success: Administrative permissions confirmed.
    ) else (
    @echo Failure: Please run as administrator.
    pause >nul
    )
    goto install