cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MikeAtSoftware
Level 4

Cannot create SQL .mdf file and can't see why not.

I'm a new user of Installshield 2008 Professional.

I've got a fairly standard project to install:

1. ASP.Net Virtual directory
2. .Net 3.0 Framework
3. SQL Express 2005

1 and 2 install as they should, but I cannot get 3 to complete, and I'm sure I must be missing something fairly obvious and newbie-related, but I can't see it, so any help would be appreciated.

I've got a working SQL script to create the database, which works as it should in SQL Server Management Studio, and creates the database in any specified location. I've added that SQL script to my IS2008 project, checked the box for 'Run Script during install', and also got a Text replacement entry for Find: %DatabaseDataDir% Replace with: [INSTALLDIR]ABCFolder.

ABCFolder is created by the Installer.

The installer runs, copies the files and folder to the target, creates a virtual directory, but always fails attempting to execute the CREATE DATABASE command from the SQL Script, complaining that "Create file encountered operating system error 5', which a Google says relates to a missing file or folder, but the folder is there at the point of the error - the installer just created it, and I've checked that. That script also creates the .mdf file successfully at the same location outside of Installshield.

Can anyone suggest any pointers to help?

Mike
Labels (1)
0 Kudos
(1) Reply
MikeAtSoftware
Level 4

As sometimes happens ... , I answered my own question wthin minutes of posting.

The target folder to hold the database file needs to have permissions set in Installsheild in the Applicaiton Data->Files and Folders section.
0 Kudos