The program files folder has always been restricted in that way - limited users can't create/update files there. It's a common misconception that this changed on UAC, but everyone ran as admin on XP and never thought about it. On UAC systems you're not admin unless you explicitly elevate. I don't know the all the cases you have, whether it's a program or SQL, or SQL impersonating a user that's updating that file. If it's a program then it needs an elevation manifest to update files in that location.
There are folders such User's Application Data which (as you might guess!) are intended for this data. I believe this is a best practice, so it always used to be a part of the Certified for Windows" requirements. You'd locate the database using the AppDataFolder property so it's not part of the variable install folder. --------------- Phil Wilson On Tue, May 13, 2014 at 6:38 AM, ALFORD Jack <jack.alf...@hexagonmetrology.com> wrote: > I have created a WIX installer that installs a service and creates a SQL > Server database. I would like to have the database created in the a subfolder > under the main folder that the service is in. I have this working as long as > the user doesn't take the installer default for the install location. The > default folder from the installer is to have a subfolder created under the > "Program Files" folder. Evidently SQL Server doesn't have permission to > create a database anywhere under the "Program Files" or "Program Files (x86)" > folders. It appears that the Program Files folders have special permissions > on them that don't allow Sql Server to create a DB there. > > Error that I receive from trying to create a database from the installer or > using Sql Server Studio > > CREATE FILE encountered operating system error 5(Access is denied.) > while attempting to open or create the physical file > > > Code that is creating the DB: > > <sql:SqlDatabase > Id="AbcDatabase" > Database="AbcDataBase" > Server="[DB_SERVER]" > ConfirmOverwrite="yes" > ContinueOnError="no" > CreateOnInstall="yes" > CreateOnReinstall="yes" > CreateOnUninstall="no" > DropOnReinstall="no" > DropOnInstall="no" > DropOnUninstall="no"> > <sql:SqlFileSpec Name="DataBaseFile" Id ="mdfFile" Filename = > "[DB_DIR]AbcDataBase.mdf"/> > <sql:SqlLogFileSpec Name="DataBaseLogFile" Id ="ldfFile" Filename = > "[DB_DIR]AbcDataBase_Log.ldf"/> > </sql:SqlDatabase > > > Can anyone provide any guidance on how I can resolve this? It seems a bit > out of the norm to tell users that they can't install this in either of > those directories. > > Thanks. > > Jack > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users