Windows apache_(un)installservice.bat fails in 1.8.0 beta 5

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Windows apache_(un)installservice.bat fails in 1.8.0 beta 5

Postby mkalen » 07. June 2012 10:46

XAMPP 1.8.0 beta 5 on Windows Server 2003.

Running apache\apache_installservice.bat produces the following error:
Code: Select all
The service name is invalid.

More help is available by typing NET HELPMSG 2185.


Running apache\apache_uninstallservice.bat produces the following error:
Code: Select all
The specified service does not exist as an installed service.


The reason is that the BAT-files still contains references to the old Apache 2.2 version. This should be fixed by changing "Apache2.2" to "Apache2.4" in apache_installservice.bat on lines 11, 13 and 14 and in apache_uninstallservice.bat on lines 12, 13 and 14.

A better solution might be to use an environment variable for the service name, like so:
  • apache_installservice.bat
    Code: Select all
    @echo off

    if "%OS%" == "Windows_NT" goto WinNT

    :Win9X
    echo Don't be stupid! Win9x don't know Services
    echo Please use apache_start.bat instead
    goto exit

    :WinNT
    setlocal
    set SERVICE=Apache2.4
    echo Installing %SERVICE% as an Service
    bin\httpd -k install
    echo Now we Start %SERVICE% :)
    net start %SERVICE%
    endlocal

    :exit
    pause
  • apache_uninstallservice.bat
    Code: Select all
    @echo off

    if "%OS%" == "Windows_NT" goto WinNT

    :Win9X
    echo Don't be stupid! Win9x don't know Services
    echo Please use apache_stop.bat instead
    goto exit

    :WinNT
    setlocal
    set SERVICE=Apache2.4
    echo Are you sure you wan't this?
    echo now stopping %SERVICE% when it runs
    net stop %SERVICE%
    echo Time to say good bye to %SERVICE% :(
    bin\httpd -k uninstall
    endlocal

    :exit
    pause
mkalen
 
Posts: 4
Joined: 07. June 2012 10:34
Operating System: Windows Server 2003

Re: Windows apache_(un)installservice.bat fails in 1.8.0 bet

Postby Altrea » 07. June 2012 12:21

Hi mkalen,

Thanks for finding that out.
Would you be so kind to report that with the feedback form at the XAMPP BETA page too?
That is the easiest way to tell the developers about such issues.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Windows apache_(un)installservice.bat fails in 1.8.0 bet

Postby mkalen » 07. June 2012 12:36

Altrea wrote:Would you be so kind to report that with the feedback form at the XAMPP BETA page too?

Thanks for the pointer, now reported at the beta page.
mkalen
 
Posts: 4
Joined: 07. June 2012 10:34
Operating System: Windows Server 2003


Return to XAMPP for Windows

Who is online

Users browsing this forum: JJ_Tagy and 36 guests