<p>I understand that we can use SMS Sender in command line mode. But i been getting this error same as this article <a href="http://www.oreillynet.com/pub/a/wireless/2003/10/10/sms.html" rel="nofollow noreferrer">http://www.oreillynet.com/pub/a/wireless/2003/10/10/sms.html</a></p>

<p>The smssender.exe will use the last device that was successfully used to send messages in the Windows version of SMS Sender. But I tried it many times, and smssender.exe always complains that no last device was used. </p>

<p>Anyone have any idea about this?</p>

Not a direct answer to your question, but might help..
Take a look at some of the sms gateway services out there.
I've used Kapow with a lot of success.
http://www.kapow.co.uk/
It's a UK company, but I'm sure you find one in your country.
Most services provide a nice easy to use web api and give you good reporting on delivery, etc. They usually don't come for free, but are comparable to your standard mobile rates for low volume and pretty cheap for higher volumes.