I am have a simple batch file removing two reg entries. It runs fine as a package and IF its the only thing in the TS. If I place any step after it or place it anywhere else in the TS it fails. I even added a simple reboot as the next step and oddly the reg files are still there. Makes no sence to me.
I am not a sccm guru or a script person and pull most of my stuff from work others have done. I included the batch file below. I do not know what the first few lines do but if I rem them out it does not work, and the only way I could get it to terminate was to exit 0 which is fine when it works properly.
I am open to any fix or suggested course of action John Michael
reg query hklm\software\classes\installer\products /f "java(tm) 7" /s | find "HKEY_LOCAL_MACHINE" > deljava.txt
for /f "tokens=* delims= " %%a in (deljava.txt) do reg delete %%a /f
del deljava.txt
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\JavaSoft\Java Runtime Environment" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" /f
exit 0