Hi everyone,
i have a little Problem with our deployment solution.
I wrote a little batch script which should delete temp files and delete a registry entry if it exists.
Unfortunately it returns errorlevel 1 and therefore scripts which should run after that script dont start since it fails.
If i run the script right on my computer with the same user used for Altiris it returns errorlevel 0
If i run it as Script from the Altiris Console i receive Errorlevel 1.
Any Idea why this could be happening?
Kind Regards,
Patrick
@echo off & setlocal enabledelayedexpansion
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer\Logging"
if %errorlevel%==1 (
goto end
) else (
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer\Logging" /f
goto end
)
:end
DEL "C:\drv\*" /F /S /Q
DEL "C:\xpinst\*" /F /S /Q
DEL "C:\Windows\Temp\*" /F /S /Q
DEL "C:\temp\*" /F /S /Q
DEL "C:\ProgramData\Symantec\Patch\*" /F /S /Q
FOR /D %%p IN ("C:\drv\*.*") DO rmdir "%%p" /s /q
FOR /D %%p IN ("C:\xpinst\*.*") DO rmdir "%%p" /s /q
FOR /D %%p IN ("C:\Windows\Temp\*.*") DO rmdir "%%p" /s /q
FOR /D %%p IN ("C:\temp\*.*") DO rmdir "%%p" /s /q
FOR /D %%p IN ("C:\ProgramData\Symantec\Patch\*.*") DO rmdir "%%p" /s /q
exit