Predicting whether an Interplanetary (IP) shock driven by solar eruptions will encounter the Earth is the prerequisite and foundation to predict its arrival time at the Earth and the geoeffectiveness. Using 542 IP shock events associated with solar eruptions during 1997—2006, the influence of intensity, location, initial shock speed, duration of solar eruptions and Solar Energetic Particles (SEP) flux upon the propagation of IP shocks is investigated statistically, and then key physical parameters mentioned above that obviously influence the IP shock's arrival at the Earth are chosen. Finally, an Earth-directed and Earth-away Shock Prediction Model (EdEaSPM) based on not only solar parameters but also SEP parameters is built. The results of historical prediction show that the success rate of EdEaSPM model is about 66%, which is significantly higher than that of the other prevailing models, STOA, ISPM and HAFv2. The False Alarm Ratio (FAR) of EdEaSPM is less than 50% and the situation that FAR is too high is improved. For the ratio of number of events with shock forecast to that with shock detection, bias, although the value of Bias of all of the models is greater than 1, the Bias of EdEaSPM is the smallest and most close to 1. For the other forecast skill scores, TSS, HSS and GSS, the EdEaSPM performs better than HAFv2 model. In addition, prediction test of 6 IP shock events between Jan. and Oct. 2012 shows that the forecast results are consistent with observations. The EdEaSPM model can forecast whether an IP shock will encounter the Earth about 1 to 3 days in advance, and its accuracy is comparable to that of the other prevailing models. In particular, the success rate and false alarm ratio are improved significantly.