fr600 Posted July 3, 2008 Report Share Posted July 3, 2008 Hi, First I wanna say that it's really a masterwork and I've been using uniserver for quite a long time. Now, I have a question: Is it possible to start the server with the help of the batch file without having an extra drive letter? I know it should be possible, but could anyone please tell me how? I hope you got what I'm trying to say. Quote Link to comment Share on other sites More sharing options...
Ota Posted July 3, 2008 Report Share Posted July 3, 2008 Uniform wont work without the extra drive, the virtual drive is need so that the paths in the config files work. You could install apache and mysql as windows services. Afaik uniform has a plugin for that. Quote Link to comment Share on other sites More sharing options...
fr600 Posted July 3, 2008 Author Report Share Posted July 3, 2008 Can the paths in the config file not load from the current working directory? Quote Link to comment Share on other sites More sharing options...
Ric Posted July 3, 2008 Report Share Posted July 3, 2008 The only way to remove that Virtual drive is to install as a service as Ota pointed out. You can install Uniform Server 3.5-Apollo as a service to any drive or folder you like First read this page: http://wiki.uniformserver.com/index.php/Bu...o:_Introduction Install the Combined bug fix it now includes some enhancements (I have delayed publishing because I have not fully tested however I am confident that’s the final changes hence published.) And this to install as a service: http://wiki.uniformserver.com/index.php/Oi...-Apollo_Service Check out this section: Server Location The script defaults to creating a folder named UniServerX.X on C drive to change these defaults: 1. Open file w2c1.pl (located in folder: *\Uniform Server\udrive\plugins\Services ) 2. Locate the line: $pathc="c:/UniServerX.X"; change it as required. · e.g. $pathc="e:/mpg/main_server"; (note use forward slashes) Note: There is no restriction on folder depth ideally keep it to a single folder. The ideal would be to allocate a dedicated drive for the server and dispense with any folders - would gain a slight speed increase All that means is you can change the drive and folder/s to what you want. All the bestRic Quote Link to comment Share on other sites More sharing options...
fr600 Posted July 4, 2008 Author Report Share Posted July 4, 2008 Thnx for ur reply. but.. but If I copy the folders inside "udrive" to the root of C or D drive (just like U drive), is it still not possible? If it works from a virtual drive, why doesn't it work from a real drive? The path could be the same (except for the drive letter).. Quote Link to comment Share on other sites More sharing options...
Ric Posted July 4, 2008 Report Share Posted July 4, 2008 I missed the point you do not wish to run as a service but wish to run as a standard installation with no virtual drive. No problem (not sure about drive c) hence I will explain using drive H. Copy all the contents of folder udrive to drive H.Copy Stop.bat and Server_Start.bat to drive H Modify the above batch files as follows: Stop.bat:-- @echo off:udrive\home\admin\program\pskill.exe Apache.exe chome\admin\program\pskill.exe Apache.exe c if errorlevel 2 goto :PAUSE :PAUSEecho .pause :END Server_Start.bat:---- home\admin\program\pskill.exe Apache.exe if errorlevel 2 goto :PAUSE if not errorlevel 1 goto :STARTED set Disk=h set apachepath=\usr\local\apache2\set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.set programit=%Disk%:\home\admin\program\set closeit=%programit%close.bat %Disk% %Disk%:cd \usr\local\phpstart \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnfCLSecho The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/]set www=\www\set apanel=\home\admin\www\start %apanel%\redirect.html if "%3"=="console" goto :CONSOLEstart %programit%uniserv.exe "%apacheit%" "%closeit%"goto :END :CONSOLE%apacheit%%closeit%goto :END :HINTCLSecho The disk %Disk% is busy. Use start.bat [disk letter]goto :PAUSE :STARTEDCLSecho ERROR!!! echo One of the instances of Apache server is started. Use stop.bat :PAUSEecho .pause :END That’s all give it a bash. All the bestRic Quote Link to comment Share on other sites More sharing options...
fr600 Posted July 4, 2008 Author Report Share Posted July 4, 2008 Thanks it worked!! Quote Link to comment Share on other sites More sharing options...
jacob lee Posted July 5, 2008 Report Share Posted July 5, 2008 using %CD% we can do a lot of things. open cmd.exe and type "echo %CD%". it will show like "C:\Documents and Settings\jacob lee" type "echo %CD:~0,1% then it will show "C" so we can change "set Disk=h" to: set Disk=%CD:~0,1% wow, I'm a Junior member! Quote Link to comment Share on other sites More sharing options...
Ric Posted July 5, 2008 Report Share Posted July 5, 2008 Yep! Liked the post, adds a little extra detail, explanation practical and makes for quick testing, popped this into the bat-snippets: http://wiki.uniformserver.com/index.php/Ba..._drive_letter_2 All the bestRic PS the Wiki is there for anyone to add his or her own material for the benefit of the Uniform Server community. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.