It worked, but the batch file is still showing up in a command window. I think the issue might be is a batch file is being called from within a batch file. So while the VB command hides the first one, the second one is not being hidden. I think at least.
Since this batch behaves in ways I am not expecting (came from Symantec) I have begun to try and rewrite with the help of a colleague to vbscript. Can you help with the missing pieces?
Batch
REM Get the Altiris Agent install path
FOR /F "tokens=2*" %%A IN ('REG.EXE QUERY "HKLM\Software\Altiris\Altiris Agent" /V "installdir"') DO SET AgentDir=%%B set tempbat=%temp%\AgentClean.bat"
REM Create temporary batch file to execute while the agent restarts echo "%AgentDir%\aexagentutil" /stop > %tempbat% echo rmdir "%AgentDir%\TaskManagement\cache" /s /q >> %tempbat% echo rmdir "%AgentDir%\TaskManagement\status" /s /q >> %tempbat% echo rmdir "%AgentDir%\TaskManagement\statusXml" /s /q >> %tempbat%
REM echo rmdir "%AgentDir%\TaskManagement\lti" /s /q >> %tempbat% -- remove away the REM, from this line only if you are running on 7.1 and above
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.