Advertisement
Guest User

Untitled

a guest
Feb 12th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.38 KB | None | 0 0
  1. @echo off
  2. rem This file is supposed to be located at %USERPROFILE%
  3.  
  4. rem search for ConsoleZ in the list of tasks, and extract its PID
  5. for /f "tokens=2" %%i in ('tasklist /fi "imagename eq Console.exe" ^| findstr "Console"') do set "PID=%%i"
  6.  
  7. rem list all Parent PIDs, and locate the ConsoleZ PID of them. Count total "sons" of ConsoleZ
  8. for /f "tokens=1" %%i in ('wmic process get parentprocessid ^| findstr %pid%^| wc -l ') do set subs=%%i
  9.  
  10. rem If there's only one son to ConsoleZ, this is the first run of ConsoleZ
  11. if %subs%==1 (
  12.    rem echo first time!
  13.     wscript %USERPROFILE%\split.vbs
  14.    REM sleep 1
  15.    REM wscript %USERPROFILE%\left.vbs
  16. ) else (
  17.    rem echo not first time!
  18. )
  19.  
  20. set PROMPT_COLOR_RED=$E[31;1m
  21. set PROMPT_COLOR_GREEN=$E[32;1m
  22. set PROMPT_COLOR_YELLOW=$E[33;1m
  23. set PROMPT_COLOR_BLUE=$E[34;1m
  24. set PROMPT_COLOR_PINK=$E[35;1m
  25. set PROMPT_COLOR_TEAL=$E[36;1m
  26. set PROMPT_COLOR=%PROMPT_COLOR_RED%
  27. set PROMPT_MAIN_COLOR=%PROMPT_COLOR_TEAL%
  28. set PROMPT_MAIN_MID=$P$E[0m
  29. set PROMPT_MAIN_SUFFIX=$G$S
  30. set PROMPT_MAIN=%PROMPT_MAIN_COLOR%%PROMPT_MAIN_MID%%PROMPT_MAIN_SUFFIX%
  31.  
  32. doskey cd=cd $* ^& %USERPROFILE%\gitprompt_check
  33. doskey git=git $* ^& %USERPROFILE%\gitprompt_check
  34. REM cd %USERPROFILE%
  35. call %USERPROFILE%\gitprompt_check
  36.  
  37.  
  38. "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat" amd64 > nul
  39. REM cd c:\nitzhaki\gtpin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement