+ Reply to Thread
Results 1 to 3 of 3

Thread: Run mySQL scripts during install

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Run mySQL scripts during install

    As part of an install script, I am running a mysql.bat file, and using that to install or upgrade a database structure using sql scripts. These sql scripts and the mysql.bat file are all installed by the script to the same folder.

    However, when the bat file runs, trying to call the scripts does not work. I get an error saying the script cannot be found. Navigating to the folder in explorer and manually running the bat file to run the scripts that way functions correctly, so I can only assume that it is something to do with the setupbuilder script that's causing the problem.

    Also, when using the bat file as it is called by the setupbuilder script, I am able to call the sql scripts if I enter the full path to the sql script in question, but each of the scripts calls secondary scripts, and I get the same error when the script tries to call those. I have no control over how those secondary scripts are called.

    Am I missing something, or does setupbuilder work in such a way that what I'm trying to do is actually impossible?

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Run mySQL scripts during install

    Andy,

    I think you are running in a typical Windows "default folder" problem (this has nothing to do with SetupBuilder). You run your script without the fully qualified pathname and Windows can't find it because the default folder is not your current folder. Try to set the "Default Directory" in the Run function.

    Does this help?

    Friedrich

  3. #3

    Default Re: Run mySQL scripts during install

    Yes, that's fixed my problem. Thanks very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •