Jump to content


Photo

Starting without Extra Drive


  • Please log in to reply
8 replies to this topic

#1 fr600

fr600

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 03 July 2008 - 01:38 PM

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.

#2 Ota

Ota

    Junior Member

  • Member
  • Pip
  • 21 posts
  • IRC Nickname: Littlex
  • Main OS: Windows Vista

Posted 03 July 2008 - 01:52 PM

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.

#3 fr600

fr600

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 03 July 2008 - 02:14 PM

Can the paths in the config file not load from the current working directory?

#4 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 03 July 2008 - 04:35 PM

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.uniforms...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.uniforms...-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 best
Ric :)

#5 fr600

fr600

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 04 July 2008 - 04:44 AM

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)..

#6 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 04 July 2008 - 08:07 AM

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 c
home\admin\program\pskill.exe Apache.exe c

if errorlevel 2 goto :PAUSE

:PAUSE
echo .
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\php
start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
CLS
echo 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 :CONSOLE
start %programit%uniserv.exe "%apacheit%" "%closeit%"
goto :END

:CONSOLE
%apacheit%
%closeit%
goto :END

:HINT
CLS
echo The disk %Disk% is busy. Use start.bat [disk letter]
goto :PAUSE

:STARTED
CLS
echo ERROR!!!
echo One of the instances of Apache server is started. Use stop.bat

:PAUSE
echo .
pause

:END


Thatís all give it a bash.

All the best
Ric :)

#7 fr600

fr600

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 04 July 2008 - 03:08 PM

Thanks it worked!!

#8 jacob lee

jacob lee

    Junior Member

  • Member
  • Pip
  • 20 posts

Posted 04 July 2008 - 10:31 PM

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!

#9 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 05 July 2008 - 04:37 PM

Yep! Liked the post, adds a little extra detail, explanation practical and makes for quick testing, popped this into the bat-snippets:

http://wiki.uniforms..._drive_letter_2

All the best
Ric :)

PS the Wiki is there for anyone to add his or her own material for the benefit of the Uniform Server community. :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users