WampServer 2.5 Silent Installation
Posted by: Michael12 (---.vd.ch)
Date: August 20, 2014 11:11AM

Dear All,

I packaged WampServer 2.5 via AdminStudio in MSI. The services (wampapache and wampmysqld) do not launch, even these services are not visible under the Services list.

So here are my questions:

1) Is WampServer packageable?
2) If not how could I silently install it via command line by changing it's installation directory C:\wamp to another destination other than the root as an example C:\Softs\wamp
3) Giving access to all authenticated users other than the Administrator, would it be possile?


I appreciate very much your precious support.

Thanks a lot in advance!

Kind regards,
Michael

Re: WampServer 2.5 Silent Installation
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 20, 2014 02:29PM

Well in that case your install must make the required calls to register those services, thats what the WAMPServer install does.

Look in the wampmanager.ini for examples of how that is done
For Apache:
in the section named [ApacheServiceInstall]

For MySQL:
in the section named [MySQLServiceInstall]

As to point 3: I am not exactly sure what you mean in this question.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Re: WampServer 2.5 Silent Installation
Posted by: Michael12 (---.vd.ch)
Date: August 21, 2014 10:50AM

Many thanks for your response RiggsFolly!

I did look out the wampmanager.ini file and did not find a difference with a default manual installation:

--
--
[ApacheServiceInstall]
;WAMPAPACHESERVICEINSTALLSTART
Action: run; FileName: "C:/Softs/wamp/bin/php/php5.5.12/php.exe";Parameters: "-c . testPortForInstall.php";WorkingDir: "C:/Softs/wamp/scripts"; Flags: waituntilterminated
Action: run; FileName: "C:/Softs/wamp/bin/apache/apache2.4.9/bin/httpd.exe"; Parameters: "-n wampapache64 -k install"; ShowCmd: hidden; Flags: waituntilterminated
Action: run; FileName: "reg"; Parameters: "add HKLM\SYSTEM\CurrentControlSet\Services\wampapache64 /V Start /t REG_DWORD /d 3 /f"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
;WAMPAPACHESERVICEINSTALLEND


[MySQLServiceInstall]
;WAMPMYSQLSERVICEINSTALLSTART
Action: run; FileName: "C:/Softs/wamp/bin/mysql/mysql5.6.17/bin/mysqld.exe"; Parameters: "--install-manual wampmysqld64"; ShowCmd: hidden; Flags: ignoreerrors waituntilterminated
Action: resetservices;
Action: readconfig;
;WAMPMYSQLSERVICEINSTALLEND

--
--

As to point 3) My question was; given the fact that admin right is mandatory to launch a WampServer. How can we bypass it and give right to non admin users the right to launch WampServer?

Thanks a lot!

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: August 21, 2014 03:23PM

Hello,

This is a translation of a contribution that I had posted on the French forum Wampserver.

I have test launching of WampServer - thus starting wampapache and wampmysqld services - in a "standard" user session that is to say without administrator privileges, and it works, at least on my W7 session Pro 64-bit with two users:
- "Dominique" administrator
- "Otomatic" standard user

Everything that follows is to be performed in an administrator session:

Download the utility "Setacl.exe" the free version from the command line on the website [helgeklein.com]
This version:
Administrators: Download the EXE version of SetACL 3.0.6 for 32-bit and 64-bit Windows.

Unzip the file, which will create a folder: SetACL (executable Version)\ in which there are two other folder for 32 bit and 64 bit versions.
Open a command window into the 32 or 64 bits folder depending on the version of Windows. If you have a Windows 64-bit, it is imperative to run the 64-bit version of setacl.
In the command window, we will give the rights to a user to start, stop and read wampapache and wampmysqld services, in my case the user without rights "Otomatic."
Generic command is:
setacl -on "service_name" -ot srv -ace "n:user_name_without_rights;p:start_stop,read" -actn ace
which gives the following two commands for WampServer:
setacl -on "wampapache" -ot srv -ace "n:Otomatic;p:start_stop,read" -actn ace
setacl -on "wampmysqld" -ot srv -ace "n:Otomatic;p:start_stop,read" -actn ace
Of course, you replace Otomatic by the name of the user you want to allow to start the services. The user account must exist before performing the commands.

By connecting with Otomatic session, I can start WampServer, which starts the services and pass the icon green with access to localhost and phpMyAdmin.
It works also with Windows 8/8.1 32 or 64 bits.

---- Now, regarding your first two questions.
WampServer is an application designed from Aestan Tray Menu. The "heart" of WampServer is the script wamp/script/refresh.php that creates and/or modifies the wampserver.ini file from wampserver.tpl template file and the information contained on wampserver.conf and config.inc.php.
Aestran Tray Menu has not changed since September 2008; However, due to its simplicity and its operating principle, it still works perfectly, even with Windows 8.1 64 bit.
To get an idea of how Aestran Tray Menu works, you can download and unzip the archive to a folder where you have a dist folder from which you run the AeTrayMenu.chm file for explanations and help.

The WampServer installer is Inno Setup, but even if I make changes to WampServer, I am not the "master" of compiling the installation executable and I do not know if he makes it with silent installation options. Perhaps, because there only needs two: installation folder (C:\wamp by default) and the browser used (Internet Explorer by default).
It is possible to "dissect" the installer with Inno Setup Unpacker.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: WampServer 2.5 Silent Installation
Posted by: Michael12 (---.vd.ch)
Date: September 08, 2014 11:02AM

Many thanks for your response dear Otomatic.

In the administration session using the SetACL the two services start, stop & read access have been granted to all authenticated users. So the non-admin authenticated users can launch and stop the two services.

The problem I encouter is, even though non-admin users can start and stop the services, when the wampserver from the start menu (wampmanager.exe) is launched an administrator right is requested.

How could non-admin user launch the "wampmanger.exe"?

Thans a lot!

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: September 08, 2014 11:15AM

Hi,

> How could non-admin user launch the "wampmanger.exe"?
Use "runas".

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: WampServer 2.5 Silent Installation
Posted by: Michael12 (---.vd.ch)
Date: September 08, 2014 02:10PM

When you launch "start WampServer" with "Runas administrator" as a non-admin user, the administrator's login is requested. My question is how to bypass this request and open/launch wampServer...

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: September 08, 2014 03:09PM

Hi,

When I performed the tests as described above, before switching to a no administrator session, the shortcut that launches Wampserver was configured: Run as administrator.

As my Windows is French, I don't know the names in English:
- Shortcut, Right-Click, Properties, Shortcut Tab, Advanced, Run as administrator validated
OK, OK

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 09/08/2014 05:19PM by Otomatic.

Re: WampServer 2.5 Silent Installation
Posted by: Michael12 (---.vd.ch)
Date: September 09, 2014 09:14AM

My Windows is likewise in French. I activated "Exécuter ce programme en tant qu'administrateur" (Modifier les paramètres pour tous les utilisateurs) the shortcut from the start menu.

With no administrator session, despite the fact that the shortcut has been configured to be executed as an administrator, it requests an adminstrator login in order to be launched. How can I bypass this admin login request?

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: September 09, 2014 09:49AM

Hi,
I do not know how. For me, it works as I explained earlier.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: WampServer 2.5 Silent Installation
Posted by: sruj (---.lubin.vectranet.pl)
Date: September 06, 2016 11:54PM

Otomatic Wrote:
-------------------------------------------------------

>
> setacl -on "wampapache" -ot srv -ace
> "n:Otomatic;p:start_stop,read" -actn ace
> setacl -on "wampmysqld" -ot srv -ace
> "n:Otomatic;p:start_stop,read" -actn ace
>



is it still actual solution?

couse i got:

C:\Users\superadmin\Desktop\SetACL (executable version)\64 bit>setacl -on "wampa
pache" -ot srv -ace "n:chiny;p:start_stop,read" -actn ace
Processing ACL of: <wampapache>
Reading the SD from <wampapache> failed with: The specified service does not exist as an installed service
SetACL finished with error(s):
SetACL error message: The call to GetNamedSecurityInfo () failed
Operating system error message: The specified service does not exist as an installed service

C:\Users\superadmin\Desktop\SetACL (executable version)\64 bit>



Edited 2 time(s). Last edit at 09/07/2016 12:16AM by sruj.

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: September 07, 2016 09:22AM

Hi,

I wrote :
setacl -on "service_name" -ot srv -ace "n:user_name_without_rights;p:start_stop,read" -actn ace

SERVICE_NAME is not always wampapache or wampmysqld.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: WampServer 2.5 Silent Installation
Posted by: sruj (---.lubin.vectranet.pl)
Date: September 07, 2016 12:19PM

Otomatic Wrote:
-------------------------------------------------------
> SERVICE_NAME is not always wampapache or
> wampmysqld.

What are proper service names for latest wamp 64 bit installation?

Re: WampServer 2.5 Silent Installation
Posted by: RiggsFolly (Moderator)
Date: September 07, 2016 01:02PM

They are wampapache64 and wampmysqld64

If you look at your services.msc snapin they should be listed along with all the other registered service

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 09/07/2016 04:53PM by RiggsFolly.

Re: WampServer 2.5 Silent Installation
Posted by: Otomatic (Moderator)
Date: September 07, 2016 03:10PM

Hi,

> What are proper service names for latest wamp 64 bit installation?
Are you not able to think for yourself instead of always waiting for others to do it for you?

Read the error messages, they are very explicit.
The specified service does not exist as an installed service
The error messages are not Christmas lights, just there to be beautiful.

And after, if you want to know what are the names of the services :
- Right-Click Wampmanager Tray Icon -> Tools -> Check state of service

But there are other ways:
- See wampmanager.conf file
- See in Services Manager
- See wampmanager.ini file

Be initiatives and not always wait for another to do it for you.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: WampServer 2.5 Silent Installation
Posted by: sruj (---.lubin.vectranet.pl)
Date: September 07, 2016 07:36PM

You are right. In perfect world I should first read setACL documentation to understand what this software stands for, I should associate "service" word to Polish word "uslugi", I should use English Windows version. In the real world I just concentrate on my narrow tasks, and problems not strictly conected to these tasks I search in google for quick solution. In my world i meet word "service" in many contexts not associated with Windows. Anyway You both are doing great job here so you can scold me sometimes.



Edited 2 time(s). Last edit at 09/07/2016 07:46PM by sruj.

Sorry, only registered users may post in this forum.