Skip to content

Instantly share code, notes, and snippets.

@servercharlie
Last active April 3, 2017 02:52
Show Gist options
  • Save servercharlie/321d29672a686b35b83dc9be48459b03 to your computer and use it in GitHub Desktop.
Save servercharlie/321d29672a686b35b83dc9be48459b03 to your computer and use it in GitHub Desktop.
sc-tools
@echo off
@title "SC-Tools Installer"
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Failure: Current permissions not enough, please run as admin.
pause >nul
exit
) else (
echo Success: Administrative permissions confirmed.
echo Creating directory %appdata%\sc-tools..
mkdir %appdata%\sc-tools
echo Navigating to %appdata%\sc-tools..
cd /d %appdata%\sc-tools
echo Downloading unzip..
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://', 'unzip.exe')"
echo Creating %cd%\curl directory
echo Downloading curl.zip..
echo Extracting curl.zip to %cd%\curl..
)
REM http://stackoverflow.com/a/11995662
REM http://stackoverflow.com/a/20476904
REM http://stackoverflow.com/a/25978837 To check windows version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment