It is very difficult to pass inspection with OBD II if you reset the codes by disconnecting the battery or any other means if your vehicle has a problem. The reason is that most states scan the ECM for fault codes in which case it won't pass if they are present. If the ECM has been cleared, the vehicle has to be driven through enough cycles for the ECM to determine that nothing is wrong. If the vehicle is presented before the ECM has been through these cycles, the scanner will indicate that to the inspector and it will be declined until all the flags have been reset. During this time, it is most likely that any hard fault will reset a code. You can buy a scanner if you like but, if the vehicle is not repaired, it won't likely pass inspection until the problem is corrected. The scanner will help track down to problem and allow you to reset the fault codes once repairs have been completed. If the repair was not effective, it will reset the code during the driving cycles to reset the flags. Yes, the system is stacked against you. That is because so many people in the past preferred to ignore problems with their vehicles emission system.
Lugnut