Skip to content

Commit ba4be33

Browse files
authored
Merge pull request #603 from aquasecurity/DT-12116
DT-12116
2 parents f1c81e5 + 2cf5c16 commit ba4be33

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

enforcers/vm_enforcer/golden_image/AquaGoldenImagePrep.bat

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ goto end
3131

3232
:display_prompt
3333
@echo.
34-
SET /P PROCEED=The Aqua Golden Image preparation script will perform irreversible cleanup actions on the VM Enforcer. Proceed? [Y/N]
34+
SET /P PROCEED=The Aqua Security Golden Image preparation script will perform irreversible cleanup actions on the VM Enforcer. Proceed? [Y/N]
3535
IF /I "%PROCEED%" NEQ "Y" goto end
3636

3737
:please_wait
@@ -41,10 +41,14 @@ IF /I "%PROCEED%" NEQ "Y" goto end
4141
:stop_service
4242
net stop slkd >nul 2>&1
4343
net stop containermonitor >nul 2>&1
44+
goto delete_logical_name
45+
46+
:delete_logical_name
47+
reg add HKEY_LOCAL_MACHINE\SOFTWARE\AquaSecurity\WindowsAgent /v AgentLogicalName /t REG_SZ /d "" /f
4448
goto delete_database
4549

4650
:delete_database
47-
del /Q /F "%AQUA_DATA_DIR%\*" >nul 2>&1
51+
del /Q /F "%AQUA_DATA_DIR%\*.db*" >nul 2>&1
4852
goto delete_guid
4953

5054
:delete_guid
@@ -60,4 +64,4 @@ goto print_success
6064
@echo Operation successful. The VM Enforcer is ready for Golden Image creation.
6165
goto end
6266

63-
:end
67+
:end

0 commit comments

Comments
 (0)