Jump to content


Change my.ini values during installtime?

  • Please log in to reply
1 reply to this topic

#1 seinstein

  • Members
  • PipPip
  • Member
  • 11 posts

Posted 26 July 2006 - 03:22 PM


I have made an installer for Apache/PHP/MySQL and so on but the user is restricted to installing to a particular drive+path depending on the values I insert in the my.ini file which can reside inside the mySQL folder itself. However I was wondering if there was a way to change these values dynamically during installtime based on where the user is planning on installing the package, for example if they wanted to install to an F:/ drive (perhaps an extra Hard Disk on their system), could I have the my.ini file values point to this when written to disk ie datadir=F:/www/mysql/data and so on...? :)

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 July 2006 - 03:40 PM

I don't see why not... but you'd need something capable of search/replace, something like awk/perl, where you could simply substutite predefined markers for paths.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users