Can we automate installtion of CUDA toolkit, while installing our own code?

I’m trying to write a script for installing my own application. Is it possible to integrate a snippet of code to automate the cuda installation while doing the installation of my application?