Hi Eshetu,
Regarding your first question, there isn't a way to embed a shell script that would run before the installer executes. Any files added to the package would be inside the installer, which would need to run to extract the contents.
Regarding your second question, I believe this can be done from within your app. You can create a custom function in MATLAB - which copy and pastes x.dektop file in the required location (Desktop in this case) and you can call this function at the end of your app. But even in this case you have to run it manually after installation.