-
Notifications
You must be signed in to change notification settings - Fork 1
/
RapidTyping.bat
369 lines (335 loc) · 12 KB
/
RapidTyping.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: https://linktr.ee/hieuckit ::
:: Github: https://github.com/hieuck/curl-uri-wget-download-setup ::
:: Facebook: https://www.facebook.com/ZzhieuhuhongzZ/ ::
:: Donate to me: Vietcombank - 9966595263 - LE TRUNG HIEU ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ECHO OFF
:: Run As Administrator
>nul reg add hkcu\software\classes\.Admin\shell\runas\command /f /ve /d "cmd /x /d /r set \"f0=%%2\" &call \"%%2\" %%3" &set _= %*
>nul fltmc || if "%f0%" neq "%~f0" ( cd.>"%tmp%\runas.Admin" &start "%~n0" /high "%tmp%\runas.Admin" "%~f0" "%_:"=""%" &exit /b )
title _Hieuck.IT_'s Windows Application Setting Up...
color 0B
mode con:cols=100 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date%%time%
@echo Dang Cau Hinh %SOFTNAME%. Vui Long Cho...
@echo off
pushd "%~dp0"
:: Detect Windows Architecture
if exist "%SYSTEMROOT%\SysWOW64" (
set "ARCH=x64"
) else (
set "ARCH=x86"
)
:: Set License Extract7z Soft Process Name CheckOSVersion User Agent
set "License="
set "Extract7z="
set "SOFTNAME=RapidTyping"
set "PROCESS=RapidTyping.exe"
set "CheckOSVersion=No"
set "USERAGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
:: Set code based on Windows Architecture
:: Source link:
if %ARCH%==x86 (
set "LINK=https://rapidtyping.com/en/downloads/typing-tutor/ver-5/RapidTyping_Setup_5.4_x32.exe"
) else (
set "LINK=https://rapidtyping.com/en/downloads/typing-tutor/ver-5/RapidTyping_Setup_5.4.exe"
)
set "QUIETMODE=/S"
set "SOFTPATH=%PROGRAMFILES%\RapidTyping 5"
:: Set up information related to software cr4cking
if "%License%"=="Yes" (
set "Admin=Yes"
set "CR4CKFILE=danvaoday"
set "CR4CKPATH=%SOFTPATH%"
set "CR4CKLINK=https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/Cr4ck/!CR4CKFILE!.rar"
set "LINK7zdll=https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/7z/7z.dll"
set "LINK7zexe=https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/7z/7z.exe"
)
::Extract with 7z
if "%Extract7z%"=="Yes" (
set "FILENAME=%SOFTNAME%-HieuckIT.zip"
set "Admin=Yes"
set "Shortcut=Yes"
set "SOFTPATH=%PROGRAMFILES%\%SOFTNAME%"
set "LINK7zdll=https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/7z/7z.dll"
set "LINK7zexe=https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/7z/7z.exe"
) else (
set "Shortcut=Yes"
set "FILENAME=%SOFTNAME%-HieuckIT.exe "
)
set "SOFTLOCATION=%SOFTPATH%\%PROCESS%"
::Check Windows OS Version
if /i "%CheckOSVersion%"=="no" (
goto SkipCheckOSVersion
)
setlocal EnableDelayedExpansion
for /f "tokens=4 delims=[.] " %%i in ('ver') do (
set "version1=%%i"
)
for /f "tokens=5 delims=[.] " %%i in ('ver') do (
set "version2=%%i"
)
set "version=%version1%.%version2%"
if "%version%"=="6.1" (
echo Sorry, this software is not compatible with Windows 7. Exiting in 3 seconds...
for /l %%i in (3,-1,1) do (
echo Exiting in %%i seconds...
timeout /t 1 /nobreak >nul
)
exit
)
endlocal
:SkipCheckOSVersion
:: Check if Command Prompt is running with administrator privileges
net session >nul 2>&1
if %errorlevel% == 0 (
echo Command Prompt is running as Administrator.
) else (
if "%Admin%"=="Yes" (
echo Please Run as Administrator. Exiting in 3 seconds...
for /l %%i in (3,-1,1) do (
echo Exiting in %%i seconds...
timeout /t 1 /nobreak >nul
)
exit
) else (
echo Warning: This program may not function correctly without administrator privileges.
for /l %%i in (3,-1,1) do (
echo Starting in %%i seconds...
timeout /t 1 /nobreak >nul
)
)
)
:: Terminate the %SOFTNAME% Process
tasklist | find /i "%PROCESS%" > nul
if %errorlevel% equ 0 (
taskkill /im "%PROCESS%" /f
)
:: Save the value of the %time% variable before running the batch script
set start_time=%time%
:: Download
@ECHO OFF
title _Hieuck.IT_'s Windows Application Downloading...
color 0B
mode con:cols=100 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date%%time%
@echo Dang Tai %SOFTNAME%. Vui Long Cho...
@echo off
pushd "%~dp0"
echo Downloading %SOFTNAME%...
if exist "wget.exe" (
wget --no-check-certificate --show-progress -q -O "%FILENAME%" -U "%USERAGENT%" "%LINK%"
) else (
curl -L --max-redirs 20 -A "%USERAGENT%" -o "%FILENAME%" "%LINK%" --insecure || (
if exist "%temp%\download_error.txt" del "%temp%\download_error.txt"
echo.
echo wget.exe or curl.exe not found to download, please download at: >> %temp%\download_error.txt
echo. >> %temp%\download_error.txt
echo wget: https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/wget.exe >> %temp%\download_error.txt
echo wget: https://eternallybored.org/misc/wget/ >> %temp%\download_error.txt
echo curl: https://curl.se/download.html >> %temp%\download_error.txt
type "%temp%\download_error.txt"
start "" "%temp%\download_error.txt"
)
)
if not exist "%FILENAME%" (
echo Download %SOFTNAME% failed.
echo Please check your network connection. Exiting in 3 seconds...
for /l %%i in (3,-1,1) do (
echo Exiting in %%i seconds...
timeout /t 1 /nobreak >nul
)
exit
)
@ECHO OFF
title _Hieuck.IT_'s Windows Application Downloading 7-Zip...
color 0B
mode con:cols=100 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date%%time%
@echo Dang Tai 7-Zip. Vui Long Cho...
@echo off
pushd "%~dp0"
echo Downloading 7-Zip...
if "%Extract7z%"=="Yes" (
if exist "wget.exe" (
wget --no-check-certificate --show-progress -q -O "7z.dll" -U "%USERAGENT%" "%LINK7zdll%"
wget --no-check-certificate --show-progress -q -O "7z.exe" -U "%USERAGENT%" "%LINK7zexe%"
) else (
curl -L --max-redirs 20 -A "%USERAGENT%" -o "7z.dll" "%LINK7zdll%" --insecure
curl -L --max-redirs 20 -A "%USERAGENT%" -o "7z.exe" "%LINK7zexe%" --insecure
)
)
:: Install
@ECHO OFF
title _Hieuck.IT_'s Windows Application Installing...
color 0B
mode con:cols=100 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date%%time%
@echo Dang Cai Dat %SOFTNAME%. Vui Long Cho...
@echo off
pushd "%~dp0"
echo Installing %SOFTNAME%...
if "%Extract7z%"=="Yes" (
@7z.exe x "%FILENAME%" -o"%SOFTPATH%" -aoa -y
) else (
"%FILENAME%" %QUIETMODE%
)
:: Check Installation Process
echo Checking if %SOFTNAME% installation is complete...
setlocal EnableDelayedExpansion
set count=0
:waitloop
timeout /t 1 /nobreak > nul
set /a count+=1
if exist "%SOFTLOCATION%" goto installed
if !count! equ 30 goto timeout
goto waitloop
:timeout
echo Timeout: %SOFTNAME% installation has not completed in 30 seconds.
goto end
:installed
echo %SOFTNAME% has been installed successfully.
timeout /t 3
:end
:: License
@ECHO OFF
title _Hieuck.IT_'s Windows Application Cr4cking...
color 0B
mode con:cols=100 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date%%time%
@echo Dang Cau Hinh %SOFTNAME%. Vui Long Cho...
@echo off
pushd "%~dp0"
if "%License%"=="Yes" (
echo Cr4cking %SOFTNAME%...
if exist "wget.exe" (
wget --no-check-certificate --show-progress -q -O "7z.dll" -U "%USERAGENT%" "%LINK7zdll%"
wget --no-check-certificate --show-progress -q -O "7z.exe" -U "%USERAGENT%" "%LINK7zexe%"
wget --no-check-certificate --show-progress -q -O "%CR4CKFILE%" -U "%USERAGENT%" "%CR4CKLINK%"
) else (
curl -L --max-redirs 20 -A "%USERAGENT%" -o "7z.dll" "%LINK7zdll%" --insecure
curl -L --max-redirs 20 -A "%USERAGENT%" -o "7z.exe" "%LINK7zexe%" --insecure
curl -L --max-redirs 20 -A "%USERAGENT%" -o "%CR4CKFILE%" "%CR4CKLINK%" --insecure
)
if exist "%CR4CKFILE%" (
@7z.exe x -p123 "%CR4CKFILE%" -o"%CR4CKPATH%" -aoa -y
echo Successfully Cr4cked %SOFTNAME%.
del "%CR4CKFILE%"
) else (
echo Cr4cking %SOFTNAME% failed.
echo Please try running the script as Administrator.
)
)
:: Shortcut
if /i "%Shortcut%"=="no" (
echo Creating shortcut is skipped.
goto CleanUp
)
if exist "%SOFTLOCATION%" (
set "TARGETFILE=%SOFTLOCATION%"
) else (
echo %SOFTNAME% does not exist in directory "%SOFTPATH%". Exiting script.
exit /b 1
)
set "SHORTCUTNAME=%SOFTNAME%.lnk"
set "SHORTCUTPATH=%PUBLIC%\Desktop\%SHORTCUTNAME%"
echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs
echo sLinkFile = "%SHORTCUTPATH%" >> CreateShortcut.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs
echo oLink.TargetPath = "%TARGETFILE%" >> CreateShortcut.vbs
echo oLink.WorkingDirectory = "%SOFTPATH%" >> CreateShortcut.vbs
echo oLink.Description = "Shortcut to %SOFTNAME%" >> CreateShortcut.vbs
echo oLink.Save >> CreateShortcut.vbs
cscript CreateShortcut.vbs
del CreateShortcut.vbs
if exist "%PUBLIC%\Desktop\%SHORTCUTNAME%" (
echo Creating shortcut complete.
) else (
echo Creating shortcut failed.
)
:: Clean Up
:CleanUp
if exist "%FILENAME%" del "%FILENAME%"
if exist "%temp%\download_error.txt" del "%temp%\download_error.txt"
if exist "7z.dll" del "7z.dll"
if exist "7z.exe" del "7z.exe"
:: Save the value of the %time% variable after the batch script finishes
set end_time=%time%
:: Calculate the difference between the two %start_time% and %end_time% values
set /a elapsed_time=(%end_time:~0,2%*3600 + %end_time:~3,2%*60 + %end_time:~6,2%) - (%start_time:~0,2%*3600 + %start_time:~3,2%*60 + %start_time:~6,2%)
echo Time elapsed: %elapsed_time% seconds.
echo The script will automatically close in 3 seconds.
for /l %%i in (3,-1,1) do (
echo Closing in %%i seconds...
timeout /t 1 /nobreak >nul
if exist "7z.dll" (
tasklist | find /i "7z.dll" > nul
if %errorlevel% equ 0 taskkill /im "7z.dll" /f
del "7z.dll"
)
if exist "7z.exe" (
tasklist | find /i "7z.exe" > nul
if %errorlevel% equ 0 taskkill /im "7z.exe" /f
del "7z.exe"
)
if exist "%FILENAME%" (
tasklist | find /i "%FILENAME%" > nul
if %errorlevel% equ 0 taskkill /im "%FILENAME%" /f
del "%FILENAME%"
)
)
echo Please close the script manually if automatically close fails.
popd