It depends what program you are scripting for. A lot of MS programs will have deployment documentation in which they will give you command line options. You can also find these command line options by running this at command prompt. path\setup.exe /? This is for MS only.
I have also done some packages (winzip, crystal reports) that had documentation available specifically for SMS silent installs.
Of course you can always use SMS installer. I prefer using batch files so I have the control of what is happening.
So to answer your question, it depends on the program. Always start with the companies web site and do searches for silent install, unattended install or SMS.