You are here

How to make XAMPP more portable with CMS that uses absolute path

2 posts / 0 new
Last post
Feodor
Offline
Last seen: 12 years 9 months ago
Joined: 2008-04-16 08:49
How to make XAMPP more portable with CMS that uses absolute path

This solution is for portable version of XAMPP wih installed CMS (such as Joomla!) that use absolute path.

Hi! I'm using XAMPP for web demonstrations from my portable USB HDD. In this case i'm using it on different Windows machines and the drive latter is different for each machine. The problem was to use CMS (Joomla) as it use absolute path (I:\\xampp\\htdocs...). In this case I have to change this setting in CMS for each machine. The solution is to use the virtual drive with usualy unused drive latter (W: for example). I've wrote the bat file to do this and it works(put it in xampp directory):

@ECHO Starting XAMPP Portable...
@ECHO OFF
set Disk=%1
IF "%Disk%"=="" set Disk=w
subst %Disk%: /D
subst %Disk%: "..\xampp"
%Disk%:
@ECHO Stoping apache, mysql, filezilla and mercury if running...
@ECHO OFF
xampp_stop.exe
@ECHO Starting XAMPP Control Panel Application...
@ECHO DO NOT CLOSE THIS WINDOW!!!
@ECHO OFF
xampp-control.exe
xampp_stop.exe
subst %Disk%: /D
exit

after run it use setup_xampp.bat from virtual drive to config. Thats all.
Simply run created bat file to start XAMPP. After exit from Control Panel it stops services and unmounts virtual drive. It will be great if somewone will improve this ability, because it very useful.
Tested on XP and Vista 64. Subst - is internal windows nt command.
Please reply if You know other solution for this problem.
Sorry for my English, i'm from Russia.

Feodor
Offline
Last seen: 12 years 9 months ago
Joined: 2008-04-16 08:49
Now You can put xampp in

Now You can put xampp in Drive_latter:\PortableApps\XAMPP\App\xampp as all portable apps from this site and modificate XAMPPLauncher.exe: Instead of xampp-control.exe write your created .bat file.

Log in or register to post comments