-
Notifications
You must be signed in to change notification settings - Fork 1
/
HeavenBenchmark.bat
613 lines (557 loc) · 19.1 KB
/
HeavenBenchmark.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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: 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
pushd "%~dp0"
REM 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=120 lines=17
if not exist "wget.exe" mode con:cols=80 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
REM Required Configuration Settings
set "Extract7z="
set "License="
set "SoftName=Heaven Benchmark"
set "Process=heaven.bat"
set "FileName="
set "SoftNameVersion="
set "FileDLwB=Unigine*Heaven*.exe"
set "SupportOldWindows=Yes"
set "Support32Bit=Yes"
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"
REM Set code based on Windows Architecture
REM Source Link: https://benchmark.unigine.com/heaven
set "LinkForOldWindows="
set "LinkForOldWindows32bit="
set "LinkForOldWindows64bit="
set "Link=https://assets.unigine.com/d/Unigine_Heaven-4.0.exe"
set "LinkForAllWindows32bit="
set "LinkForAllWindows64bit="
set "SoftPath="
set "SoftPathFor32bit=%ProgramFiles%\Unigine\Heaven Benchmark 4.0"
set "SoftPathFor64bit=%ProgramFiles(x86)%\Unigine\Heaven Benchmark 4.0"
set "QuietMode=/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"
set "Cr4ckFile="
set "Cr4ckPath="
set "Shortcut="
REM Detect Windows Architecture and Check Compatibility for 32-bit
if exist "%SYSTEMROOT%\SysWOW64" (
set "ARCH=x64"
) else (
set "ARCH=x86"
)
if /i "%Support32Bit%"=="No" (
if /i "%ARCH%"=="x86" (
echo Notice: This software is only compatible with Windows 64-bit operating systems. Exiting in 3 seconds...
for /l %%i in (3,-1,1) do (
echo Exiting in %%i seconds...
timeout /t 1 /nobreak >nul
)
exit
)
)
::Check Windows OS Version and Check Support Old Windows
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" goto ForOldWindows
goto ForNewWindows
endlocal
:ForOldWindows
if /i "%SupportOldWindows%"=="No" (
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
) else (
if /i "%ARCH%"=="x86" (
if not "%LinkForOldWindows32bit%"=="" (
set "Link=%LinkForOldWindows32bit%"
) else (
if not "%LinkForOldWindows%"=="" (
set "Link=%LinkForOldWindows%"
) else (
if not "%LinkForAllWindows32bit%"=="" (
set "Link="%LinkForAllWindows32bit%"
) else (
set "Link=%Link%"
)
)
)
if not "%SoftPathFor32bit%"=="" set "SoftPath=%SoftPathFor32bit%"
) else (
if not "%LinkForOldWindows64bit%"=="" (
set "Link=%LinkForOldWindows64bit%"
) else (
if not "%LinkForOldWindows%"=="" (
set "Link=%LinkForOldWindows%"
) else (
if not "%LinkForAllWindows64bit%"=="" (
set "Link=%LinkForAllWindows64bit%"
) else (
set "Link=%Link%"
)
)
)
if not "%SoftPathFor64bit%"=="" set "SoftPath=%SoftPathFor64bit%"
)
)
goto NextStepForCheckOSVersion
:ForNewWindows
if /i "%ARCH%"=="x86" (
if not "%LinkForAllWindows32bit%"=="" set "Link=%LinkForAllWindows32bit%"
if not "%SoftPathFor32bit%"=="" set "SoftPath=%SoftPathFor32bit%"
) else (
if not "%LinkForAllWindows64bit%"=="" set "Link=%LinkForAllWindows64bit%"
if not "%SoftPathFor64bit%"=="" set "SoftPath=%SoftPathFor64bit%"
)
:NextStepForCheckOSVersion
REM Extract with 7z
if /i "%Extract7z%"=="Yes" (
set "Admin=Yes"
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"
if not "%SoftPath%"=="" (
set "SoftPath=%SoftPath%"
) else (
set "SoftPath=%ProgramFiles%\%SoftName%"
)
if not "%Shortcut%"=="" (
set "Shortcut=%Shortcut%"
) else (
set "Shortcut=Yes"
)
) else (
if not "%Shortcut%"=="" (
set "Shortcut=%Shortcut%"
) else (
set "Shortcut=No"
)
)
REM Set up information related to software cr4cking
if /i "%License%"=="Yes" (
set "Admin=Yes"
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"
if not "%Cr4ckPath%"=="" (
set "Cr4ckPath=%Cr4ckPath%"
) else (
set "Cr4ckPath=%SoftPath%"
)
)
REM Check File Name
REM Data structure to store format-extension information
set "Formats=7z exe msi rar zip"
for %%F in ("%FileName%") do (
set "BaseName=%%~nF"
if not "%%~xF"=="" (
set "Extension=%%~xF"
) else (
set "Extension=.HieuckIT"
set "BaseName=%FileName%"
)
)
if not "%FileName%"=="" (
if not "%BaseName%"=="" (
REM Loop through the formats in the data structure
for %%F in (%Formats%) do (
REM Check if FileName matches the format
if /i "%FileName%"=="%%~F" (
set "BaseName=%SoftName%"
set "Extension=.%%~F"
set "FileName=%BaseName%%Extension%"
goto :Continue_Check_FileName
)
)
REM Check if FileName doesn't match any format
if not "%FileName%"=="%BaseName%%Extension%" (
set "FileName=%BaseName%%Extension%"
)
) else (
set "FileName=%SoftName%%Extension%"
)
) else (
if not "%Link:~-3%"=="" (
REM Extract the extension from Link
set "BaseName=%SoftName%"
set "LinkExtension=%Link:~-3%"
REM Check if LinkExtension is not in Formats
echo %Formats% | find /i "%LinkExtension%" >nul
if errorlevel 1 (
set "Extension=%LinkExtension%"
) else (
set "Extension=.HieuckIT"
)
set "FileName=%BaseName%%Extension%"
goto :Continue_Check_FileName
) else (
set "FileName=%SoftName%.HieuckIT"
)
)
:Continue_Check_FileName
REM Check if Link's extension matches any format and differs from FileName's extension
set "LinkExtension=%Link:~-3%"
for %%F in (%Formats%) do (
REM Check if the extracted extension matches the format and differs from FileName's extension
if /i "%LinkExtension%"=="%%~F" if not "%Extension%"=="%%~F" (
REM set "BaseName=%SoftName%"
set "Extension=.%%~F"
set "FileName=%BaseName%%Extension%"
goto :ExportResult
)
)
REM If Link's extension didn't match any format or matched FileName's extension, use Link's extension for FileName
set "LinkExtension=%Link:~-3%"
set "FoundFormat="
for %%F in (%Formats%) do (
if /i "%LinkExtension%"=="%%~F" (
set "FoundFormat=1"
set "Extension=.%%~F"
)
)
if not defined FoundFormat (
if "%Extension%"=="" (
set "Extension=.HieuckIT"
)
)
:ExportResult
set "FileName=%BaseName%%Extension%"
echo Information related to %SoftName%:> %Temp%\hieuckitlog.txt
echo.>> %Temp%\hieuckitlog.txt
echo Link: %Link:&=^&%>> %Temp%\hieuckitlog.txt
echo FileName: %FileName%>> %Temp%\hieuckitlog.txt
if not "%SoftPath%"=="" echo SoftPath: %SoftPath%>> %Temp%\hieuckitlog.txt
if not "%Cr4ckFile%"=="" echo Cr4ckFile: %Cr4ckFile%>> %Temp%\hieuckitlog.txt
if not "%Cr4ckLink%"=="" echo Cr4ckLink: %Cr4ckLink%>> %Temp%\hieuckitlog.txt
if not "%Cr4ckPath%"=="" echo Cr4ckPath: %Cr4ckPath%>> %Temp%\hieuckitlog.txt
echo Shortcut: %Shortcut%>> %Temp%\hieuckitlog.txt
type "%Temp%\hieuckitlog.txt"
timeout /t 2
REM 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 /i "%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
)
)
)
REM Terminate the %SoftName% Process
tasklist | find /i "%Process%" > nul
if %errorlevel% equ 0 (
taskkill /im "%Process%" /f
)
REM Save the value of the %time% variable before running the batch script
set start_time=%time%
REM Download
title _Hieuck.IT_'s Windows Application Downloading...
color 0B
mode con:cols=120 lines=17
if not exist "wget.exe" mode con:cols=80 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
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 || (
echo.
echo wget.exe or curl.exe not found to download, please download at: > %Temp%\hieuckitlog.txt
echo. >> %Temp%\hieuckitlog.txt
echo wget: https://github.com/hieuck/curl-uri-wget-download-setup/raw/main/wget.exe >> %Temp%\hieuckitlog.txt
echo wget: https://eternallybored.org/misc/wget/ >> %Temp%\hieuckitlog.txt
echo curl: https://curl.se/download.html >> %Temp%\hieuckitlog.txt
type "%Temp%\hieuckitlog.txt"
start "" "%Temp%\hieuckitlog.txt"
)
)
REM Download with browser
for %%F in ("%FileName%") do set "size=%%~zF"
if %size% equ 0 (
echo %SoftName% download failed. File size is 0KB. Downloading with browser....
goto DLwB
) else if %size% lss 1048576 (
echo %SoftName% download failed. File size is less than 1MB. Downloading with browser....
goto DLwB
) else (
goto ExitDLwB
)
:DLwB
if exist "%UserProfile%\OneDrive\Downloads" (
pushd "%UserProfile%\OneDrive\Downloads"
) else (
pushd "%UserProfile%\Downloads"
)
start "" "%Link%" /WAIT /D "%~dp0" /B "%FileName%"
if not "%FileDLwB%"=="" set "FileDLwB=%FileDLwB%"
:CheckExist
for /R %%i in ("%FileDLwB%") do set "FileNameDLwB=%%i"
if not exist "%FileNameDLwB%" (
timeout /t 1 /nobreak >nul & goto CheckExist
)
echo Download completed with the browser. Installation in progress...
move /y "%FileNameDLwB%" "%~dp0%FileName%"
:ExitDLwB
pushd "%~dp0"
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
)
title _Hieuck.IT_'s Windows Application Downloading 7-Zip...
color 0B
mode con:cols=120 lines=17
if not exist "wget.exe" mode con:cols=80 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
echo Downloading 7-Zip...
if /i "%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
)
)
REM Install
title _Hieuck.IT_'s Windows Application Installing...
color 0B
mode con:cols=120 lines=17
if not exist "wget.exe" mode con:cols=80 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
echo Installing %SoftName%...
if /i "%Extract7z%"=="Yes" (
@7z.exe x "%FileName%" -o"%SoftPath%" -aoa -y
) else (
"%FileName%" %QuietMode%
)
REM 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 "%SoftPath%\%Process%" 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.
echo.>> %Temp%\hieuckitlog.txt
echo %SoftName% has been installed successfully.>> %Temp%\hieuckitlog.txt
timeout /t 2
:end
REM License
title _Hieuck.IT_'s Windows Application Cr4cking...
color 0B
mode con:cols=120 lines=17
if not exist "wget.exe" mode con:cols=80 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
if /i "%License%"=="Yes" (
echo Cr4cking %SoftName%...
if exist "wget.exe" (
if not exist "7z.dll" if not exist "7z.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 (
if not exist "7z.dll" if not exist "7z.exe" (
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%.
echo.>> %Temp%\hieuckitlog.txt
echo Successfully Cr4cked %SoftName%.>> %Temp%\hieuckitlog.txt
del "%Cr4ckFile%"
) else (
echo Cr4cking %SoftName% failed.
echo Please try running the script as Administrator.
)
)
REM Shortcut
if /i "%Shortcut%"=="No" (
echo Creating Shortcut is skipped.
goto CleanUp
)
if exist "%SoftPath%\%Process%" (
set "TargetFile=%SoftPath%\%Process%"
) 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.
echo Creating Shortcut complete.>> %Temp%\hieuckitlog.txt
) else (
echo Creating Shortcut failed.
)
REM Clean Up
:CleanUp
title _Hieuck.IT_'s Windows Application Cleaning Up...
color 0B
mode con:cols=120 lines=17
if not exist "wget.exe" mode con:cols=80 lines=17
@cls
echo.
echo.
echo.
@echo ±Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ²Û ÛÛÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛ
@echo Û ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ
@echo ±Û ²²²²² ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ²
@echo.
@echo The current date and time are: %date% %time%
@echo Dang Don Dep %SoftName%. Vui Long Cho...
@echo off
echo Cleaning up temporary files...
echo.>> %Temp%\hieuckitlog.txt
setlocal EnableDelayedExpansion
set count=0
set deleteSuccess=0
:waitloopcheck
if exist "7z.dll" del "7z.dll">> %Temp%\hieuckitlog.txt 2>&1
if exist "7z.exe" del "7z.exe">> %Temp%\hieuckitlog.txt 2>&1
if exist "%FileName%" (
del "%FileName%">> %Temp%\hieuckitlog.txt 2>&1
if not exist "%FileName%" set deleteSuccess=1
)
timeout /t 1 /nobreak > nul
set /a count+=1
if !deleteSuccess! equ 1 (
echo The %SoftName% installer has been deleted.
echo The %SoftName% installer has been deleted.>> %Temp%\hieuckitlog.txt
goto endcheck
) else (
echo.>> %Temp%\hieuckitlog.txt
)
if !count! equ 30 goto timeoutcheck
goto waitloopcheck
:timeoutcheck
echo Timeout: Deletion failed. Please delete the file manually.
echo Timeout: Deletion failed. Please delete the file manually.>> %Temp%\hieuckitlog.txt
:endcheck
REM Save the value of the %time% variable after the batch script finishes
set end_time=%time%
REM Convert the start and end times to seconds
for /f "tokens=1-3 delims=:." %%a in ("%start_time%") do set /a "start_seconds=(((%%a*60)+1%%b %% 100)*60)+1%%c %% 100"
for /f "tokens=1-3 delims=:." %%a in ("%end_time%") do set /a "end_seconds=(((%%a*60)+1%%b %% 100)*60)+1%%c %% 100"
REM Calculate the elapsed time in seconds
set /a elapsed_time=%end_seconds%-%start_seconds%
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
)
echo Please close the script manually if automatically close fails.
popd