Start Wamp services as a different Windows user
Posted by: AndyG (---.89-10-115.nextgentel.com)
Date: October 08, 2018 06:28PM

Hi,
I currently have Wamp installed on a Windows 10 machine.
I'm running some PHP scripts in connection with a database.
I'm trying to start some AutoHotkey scripts from within PHP.

My problem is that AutoHotkey is using the "System" user.
I've tried bypassing the issue using psexec or runas. None of these are doing the trick.

I figure if I start Wamp on administrator account, then AutoHotkey will also start on administrator account.

Do I need to install Apache manually ? Or is there a way to just switch windows user for Wamp ?
I tried changing it from services.msc and it doesn't start anymore..

Thank you in advance

Options: ReplyQuote
Re: Start Wamp services as a different Windows user
Posted by: Otomatic (Moderator)
Date: October 08, 2018 06:41PM

Hi,

There is a solution in this thread: [forum.wampserver.com]

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.4 32 bit - Apache 2.4.35 - PHP 7.2.11/7.1.23/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
Wampserver 3.1.4 64 bit - Apache 2.4.35 - PHP 7.2.11/7.1.23/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
PhPMyadmin 4.8.3 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Start Wamp services as a different Windows user
Posted by: AndyG (---.89-10-115.nextgentel.com)
Date: October 08, 2018 07:05PM

Thank you for your quick answer, very helpful indeed.
I managed to switch the user, no problems.

So now, my Autohotkey script starts with the desired user, but to no effect. I can see it appearing in task manager under the new username, but nothing happens.

I don't understand why this is happening, maybe you could shed some light..

Or I'll just crawl back to my linux cave, where everything works sad smiley

Options: ReplyQuote
Re: Start Wamp services as a different Windows user
Posted by: Otomatic (Moderator)
Date: October 08, 2018 07:24PM

Hi,

> I don't understand why this is happening, maybe you could shed some light.
I am afraid that I cannot provide you with a solution on this subject.
I only give answers or solutions if I have tried them and validated them in real life. When it comes to a possibility, I say so; but here, "AutoHotkey" is an area I don't know about.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.4 32 bit - Apache 2.4.35 - PHP 7.2.11/7.1.23/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
Wampserver 3.1.4 64 bit - Apache 2.4.35 - PHP 7.2.11/7.1.23/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
PhPMyadmin 4.8.3 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.