DrPantsu

Untitled

Mar 25th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. echo.
  4. if "%1" == "" (goto :credits)
  5. if "%1" == "/?" (goto :credits)
  6. set color=dull
  7. set name=None
  8. set dirtowrite=None
  9. set beep=true
  10. set ret=f
  11.  
  12. :args
  13. if "%1" == "-b" (
  14. set color=bright
  15. shift
  16. goto :args
  17. )
  18. if "%1" == "-m" (
  19. set beep=false
  20. shift
  21. )
  22. if "%1" == "-s" (
  23. set dirtowrite="%2"
  24. shift
  25. goto :verify
  26. )
  27. if "%1" == "" (goto :main)
  28. shift
  29. goto :args
  30.  
  31. :callback
  32. shift
  33. call :writedir %dirtowrite%
  34. goto :args
  35. :fail
  36. goto :args
  37.  
  38. :main
  39. echo.
  40. for /f "tokens=6,8,10 delims= " %%A IN ('uptime') DO (set var=%%Ad %%Bh %%Cm)
  41. set b=1
  42. set p=1
  43. for /f "delims=" %%A IN ('systeminfo') do (call :do "%%A")
  44. set osname=%v2r:~28%
  45. set osvers=%v3r:~28%
  46. set ram=%v24r:~28%
  47. set bios=%v17r:~28%
  48. set mobo=%v12r:~28%
  49. set mobomodel=%v13r:~28%
  50. for /f "delims=" %%A IN ('wmic cpu get name') DO (call :do2 "%%A")
  51. set cpu=%c2u:~1%
  52. set ostype=%v14r:~28%
  53. for /f "delims=" %%A IN ('wmic desktopmonitor get screenheight') DO (call :set %%A height)
  54. for /f "delims=" %%A IN ('wmic desktopmonitor get screenwidth') DO (call :set %%A width)
  55.  
  56. for /f "delims=" %%A IN ('wmic diskdrive get size') DO (call :set %%A hddsize)
  57. for /f "delims=" %%A IN ('wmic logicaldisk get freespace') DO (call :set %%A hddfree)
  58.  
  59. for /f "delims=" %%A IN ('wmic os get FreePhysicalMemory') DO (call :set %%A freeram)
  60. for /f "delims=" %%A IN ('wmic os get TotalVisibleMemorySize') DO (call :set %%A totalram)
  61.  
  62. set /a totalram2=%totalram% / 1024
  63. set /a freeram2=%freeram% / 1024
  64. set /a usedram=%totalram2% - %freeram2%
  65.  
  66. set /a total=%hddsize:~-0,-4% / 1024
  67. set /a total2=%total% * 10
  68. set /a total3=%total2% / 1024
  69.  
  70. set /a free1=%hddsize:~-0,-4% - %hddfree:~-0,-4%
  71. set /a free2=%free1% / 1024
  72. set /a free3=%free2% * 10
  73. set /a free4=%free3% / 1024
  74.  
  75. if "%color%" == "bright" (
  76. set color1=12
  77. set color2=9
  78. set color3=10
  79. set color4=14
  80. ) ELSE (
  81. set color1=4
  82. set color2=1
  83. set color3=2
  84. set color4=6
  85. )
  86. ::npx
  87. colous Writesec "[%color1%] ,.=:^!^!t3Z3z., [7]%userprofile:~9%[15]@[7]%COMPUTERNAME%""
  88. colous Writesec "[%color1%] :tt:::tt333EE3 [7]OS: [15]%osname:~0,33%%ostype:~0,3%"
  89. colous Writesec "[%color1%] Et:::ztt33EEE [%color3%]@Ee., .., [7]Kernel version:[15] %osvers:~0,8%"
  90. colous Writesec "[%color1%] ;tt:::tt333EE7 [%color3%];EEEEEEttttt33# [7]Uptime: [15]%var%""
  91. colous Writesec "[%color1%] :Et:::zt333EEQ. [%color3%]SEEEEEttttt33QL [7]Shell: [15]cmd.exe"
  92. colous Writesec "[%color1%] it::::tt333EEF [%color3%]@EEEEEEttttt33F [7]Resolution:[15] %width%x%height%"
  93. colous Writesec "[%color1%] ;3=*^```'*4EEV [%color3%]:EEEEEEttttt33@. [7]Window Manager: [15]DWM"
  94. colous Writesec "[%color2%] ,.=::::it=., [%color1%]` [%color3%]@EEEEEEtttz33QF [7]Memory: [15] %usedram%/%totalram2% MB"
  95. colous Writesec "[%color2%] ;::::::::zt33) [%color3%]'4EEEtttji3P* [7]BIOS: [15]%bios:~0,36%"
  96. colous Writesec "[%color2%] :t::::::::tt33.[%color4%]:Z3z.. [%color3%]`` [%color4%],..g. [7]MoBo: [15]%mobo:~0,-1% - %mobomodel:~0,10%"
  97. colous Writesec "[%color2%] i::::::::zt33F [%color4%]AEEEtttt::::ztF [7]CPU: [15]%cpu:~0,36%"
  98. colous Writesec "[%color2%] ;:::::::::t33V [%color4%];EEEttttt::::t3 [7]Primary HDD: [15] %free4%/%total3% GB"
  99. colous Writesec "[%color2%] E::::::::zt33L [%color4%]@EEEtttt::::z3F "
  100. colous Writesec "[%color2%] {3=*^```'*4E3) [%color4%];EEEtttt:::::tZ` "
  101. colous Writesec "[%color2%] `[%color4%] :EEEEtttt::::z7 "
  102. colous Writesec "[%color2%] [%color4%] 'VEzjt:;;z>*` [7]%date% %time%"
  103. if "%dirtowrite%" == "None" (goto :EnOF)
  104. echo.
  105. echo.
  106.  
  107. Set /P var=Taking screenshot in 5... <NUL
  108. timeout /t 1 /nobreak > NUL
  109. if "%beep%" == "true" (
  110. if /i "%ostype:~0,3%" == "X64" (nircmd64 beep 500 200)
  111. if /i "%ostype:~0,3%" == "X86" (nircmd32 beep 500 200)
  112. )
  113. Set /P var=4... <NUL
  114. timeout /t 1 /nobreak > NUL
  115. if "%beep%" == "true" (
  116. if /i "%ostype:~0,3%" == "X64" (nircmd64 beep 500 200)
  117. if /i "%ostype:~0,3%" == "X86" (nircmd32 beep 500 200)
  118. )
  119. Set /P var=3... <NUL
  120. timeout /t 1 /nobreak > NUL
  121. if "%beep%" == "true" (
  122. if /i "%ostype:~0,3%" == "X64" (nircmd64 beep 500 200)
  123. if /i "%ostype:~0,3%" == "X86" (nircmd32 beep 500 200)
  124. )
  125. Set /P var=2... <NUL
  126. timeout /t 1 /nobreak > NUL
  127. if "%beep%" == "true" (
  128. if /i "%ostype:~0,3%" == "X64" (nircmd64 beep 500 200)
  129. if /i "%ostype:~0,3%" == "X86" (nircmd32 beep 500 200)
  130. )
  131. Set /P var=1... <NUL
  132. if not %dirtowrite% == "" (
  133. if /i "%ostype:~0,3%" == "X64" (nircmd64 savescreenshotfull "%tpath%\%tname%")
  134. if /i "%ostype:~0,3%" == "X86" (nircmd32 savescreenshotfull "%tpath%\%tname%")
  135. )
  136. if %dirtowrite% == "cur" (
  137. if /i "%ostype:~0,3%" == "X64" (nircmd64 savescreenshotfull "Screenshot-CMDfetch-~$currdate.MM-dd-yy$-~$currtime.HHmm$.png")
  138. if /i "%ostype:~0,3%" == "X86" (nircmd32 savescreenshotfull "Screenshot-CMDfetch-~$currdate.MM-dd-yy$-~$currtime.HHmm$.png")
  139. )
  140. if %beep%=="true" (
  141. if /i "%ostype:~0,3%" == "X64" (nircmd64 beep 700 600)
  142. if /i "%ostype:~0,3%" == "X86" (nircmd32 beep 700 600)
  143. if /i "%ostype:~0,3%" == "X64" (nircmd64 trayballoon "CMDFetch" "Screenshot Taken!" "shell32.dll,-1001" 15000 )
  144. if /i "%ostype:~0,3%" == "X86" (nircmd32 trayballoon "CMDFetch" "Screenshot Taken!" "shell32.dll,-1001" 15000 )
  145. )
  146. goto :EnOF
  147.  
  148. :set
  149. if not "%~1" == "" (2>nul set %~2=%1)
  150. goto :EOF
  151.  
  152. :do
  153. set v%b%r="%~1"
  154. set /a b=%b%+1
  155. goto :EOF
  156.  
  157. :do2
  158. set c%p%u="%~1"
  159. set /a p=%p%+1
  160. goto :EOF
  161.  
  162. :writedir
  163. set tname=%~nx1
  164. set tpath=%~dp1
  165. if not exist "%tpath%" (colous Writesec "[4]ERROR: path for '-s' does not exist"&set ret=%random%&exit /b)
  166. goto :EOF
  167.  
  168. :verify
  169. if %dirtowrite%=="-b" (
  170. set dirtowrite="cur"
  171. goto :fail
  172. )
  173. if %dirtowrite%=="-m" (
  174. set dirtowrite="cur"
  175. goto :fail
  176. )
  177. goto :callback
  178.  
  179. :EnOF
  180. set var=
  181. set vr=
  182. set color=
  183. set d=
  184. set ret=
  185. set color1=
  186. set color2=
  187. set color3=
  188. set p=
  189. set tpath=
  190. set tname=
  191. set color4=
  192. set name=
  193. for /l %%A IN (1,1,%b%) DO (set v%%Ar=)
  194. set b=
  195. exit /b
  196. goto :EOF
  197.  
  198. :credits
  199. echo.Usage: screenfetch [-b / -d] [-m] [-s location]
  200. echo.
  201. echo.Options:
  202. echo. -d Normal colors
  203. echo. -b Make the art use bright colors instead of dark.
  204. echo. -m Mute the beeps and pop up.
  205. echo. -s [location] Save a screenshot to location.
  206. echo.
  207. echo.Thanks to:
  208. colous Writesec "[2] Arashi [10]^!1IXzW.VjDs"
  209. colous Writesec "[2] SaladFingers [10]^!SpOONsgtAo"
  210. colous Writesec "[2] Sk8rjwd"
  211. colous Writesec "[2] Anonymous"
  212. colous Writesec "[2] Developer"
  213. colous Writesec "[2] Jz9 [10]^!//QwUWqnYY"
  214. echo.
  215. colous Writesec "[15]And a special 'fuck you' to [2]Xyl2k [10]!Xyl2k1blhM [15]for not sharing."
  216. echo.
  217. echo.CMDfetch v.1.1
  218. goto :EnOF
Add Comment
Please, Sign In to add comment