I successfully install SQL Express silently.
Then I try the following
-S .\INSTANCE -Q "sp_attach_db 'ATTACH_AS_NAME', 'C:\Program Files\APP_NAME\SQLData\APP_DB.MDF'"
This works...sometimes. But Many times I wll get a permissions error on the folder "C:\Program Files\APP_NAME". If I go and give "Everyone" "Full Permission" to the folder...it works fine.
My questions are:
1) What system users need access (and at what level) to this folder to do an attach Because obviously giving everyone full access is bad.
2) Is there a better method for deploying a populated database with my application that this