-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRunTests.bat
More file actions
47 lines (35 loc) · 1.19 KB
/
RunTests.bat
File metadata and controls
47 lines (35 loc) · 1.19 KB
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
@echo off
setlocal EnableDelayedExpansion
REM Change to directory of the batch script
cd /d "%~dp0"
echo Current dir is now: %CD%
REM === Registry key for AutoCAD 2026 English version ===
set "ACAD_KEY=HKLM\SOFTWARE\Autodesk\AutoCAD\R25.1\ACAD-9101:409"
REM === Try to get the installation path ===
for /f "tokens=2,*" %%a in ('reg query "%ACAD_KEY%" /v AcadLocation 2^>nul') do (
set "ACAD_PATH=%%b"
)
if not defined ACAD_PATH (
echo ERROR: AutoCAD 2026 not found at registry key %ACAD_KEY%
exit /b 1
)
set "CoreConsole=%ACAD_PATH%accoreconsole.exe"
if not exist "!CoreConsole!" (
echo ERROR: accoreconsole.exe not found at !CoreConsole!
exit /b 1
)
echo Using accoreconsole at: !CoreConsole!
REM === Define script and template paths relative to batch file ===
set "SCRIPT=%~dp0TestRunner.scr"
set "TEMPLATE=%~dp0C3D_METRIC.dwt"
REM === Optional: support Civil 3D launch ===
set "IS_C3D=%~1"
if /I "!IS_C3D!"=="C3D" (
echo Running in Civil 3D mode...
"!CoreConsole!" /i "%TEMPLATE%" /p "<<C3D_Metric>>" /product "C3D" /s "%SCRIPT%"
) else (
echo Running in AutoCAD mode...
"!CoreConsole!" /product "ACAD" /s "%SCRIPT%"
)
echo Exit Code: %ERRORLEVEL%
exit /b %ERRORLEVEL%