If this is a standard Visual Studio setup project, there is no built in support for this. You'd have to ask in a forum related to security what the code would be. Or figure out how to use the poorly documented LockPermissions table in the MSI file by editing with Orca.
Many times this question is asked it's because the application is installed into a restricted folder like the ProgramFiles folder, and it creates or updates files in that location. If that's the reason for this question then the correct way to deal with that is to change the app to use a location such as the User's Application Data folder, which, as it name implies, is where you store and update the user's data :)