WAMP messes up the windows 10 cmd.exe file
Posted by: usalabs (---.tc.ph.cox.net)
Date: February 09, 2018 04:28PM

Everything works fine under windows 10, but WAMP messes up the command processor cmd.exe, it does something to it to prevent it from being started without WAMP, and thus when cmd.exe either as user or admin is opens, it opens in a window, then quickly resizes, then closes all by its self, this also happens when WAMP is run.

Having the command process like this is not acceptable, as I prefer to use cmd over powershell.

Is there a reason WAMP does this to cmd?

Options: ReplyQuote
Re: WAMP messes up the windows 10 cmd.exe file
Posted by: Otomatic (Moderator)
Date: February 09, 2018 04:44PM

Hi,

> Having the command process like this is not acceptable
How is it unacceptable for Wampserver to open and close command windows when starting it or changing versions of PHP, MySQL, or changing Wampserver settings and other stuff?

There is no way to hide these command window opening/closing. Even with "start /b" command, as Microsoft says " Launches the application without creating a window" doesn't work.

If it bothers you so much, nothing prevents you from using anything other than Wampserver.

------------------------------------------------------------------------------------------------------------
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: WAMP messes up the windows 10 cmd.exe file
Posted by: usalabs (---.tc.ph.cox.net)
Date: February 09, 2018 05:05PM

It's not the way WAMP uses cmd to start/stop mysql etc, but it's the way WAMP prevents cmd from being used other than by WAMP, if WAMP is not running and all other processes stopped, I should be able to issue at the run box cmd and the command window should open and stay open, but for some reason only known to WAMP developers, WAMP has done something to cmd that stops it from being opened by any other means other than WAMP.

I know this to be true, because I used a system restore to restore to way back before I install WAMP and I got the command window to stay open, but as soon as I install WAMP and run it, the command window then behaves just as it did before I did that restore.

Even with WAMP stopped all the command window does is to flash as a window, resize to 20x5 then close, I even tested it using powershell, which does stay open, so I ran ./cmd and immediately powershell resized itself to 20x5 but didn't exit, where as cmd command window does.



Edited 2 time(s). Last edit at 02/09/2018 05:09PM by usalabs.

Options: ReplyQuote
Re: WAMP messes up the windows 10 cmd.exe file
Posted by: Otomatic (Moderator)
Date: February 09, 2018 06:03PM

Hi,

Wampserver does not modify the parameters of the command windows in any way.

Both under Windows 7 Pro 64 bit and Windows 10 Pro 64 bit, I can open a command window (and even several) before or after starting Wampserver, perform manipulations in Wampmanager with opening and closing of the command windows specific to Wampserver, exit Wampserver, restart it and, there is no action whatsoever on the command windows opened directly under Windows: No resizing, no unexpected closing.



I've been using Wampserver since 2004 (at that time, called Wamp5) and I've been developing Wampserver 3 for three years and I've never seen such behavior with command windows.

------------------------------------------------------------------------------------------------------------
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 »



Edited 1 time(s). Last edit at 02/09/2018 06:20PM by Otomatic.

Options: ReplyQuote
Re: WAMP messes up the windows 10 cmd.exe file
Posted by: usalabs (---.tc.ph.cox.net)
Date: February 10, 2018 12:54AM

Well, I just verified, that is is something to do with WAMP, here's a complete run down of what I did to verify it.

1..........Complete reformat and clean install of windows 10 in a laptop
2..........Laptop not connected to internet, hence no antivirus installed, nothing but the windows updates.
3..........Installed WAMP on laptop via flash drive.
4..........Run WAMP, and watched screen while command window appears briefly, then resizes, and then vanishes just as fast as it opened, and W icon turned from red to amber, then green.
5..........waited about 30s then right clicked the W icon on taskbar, and selected Exit, then using the task manager to make sure all processes related to WAMP had exited.
6..........Pressing the Win key + R and entering cmd and pressing enter, opened the command console, but then immediately resized and closed out by itself,


So, after all this I called someone I know and they said he saw something like this some time a go and asked me to have a look at the command processor autorun setting in the registry, at:-

HKEY_CURRENT_USER\Software\Microsoft\Command Processor -> AutoRun which held a value of '& exit' which wasn't there before I installed and ran WAMP, so I did another test, but this time, I erased that value, and restarted the computer, and lo and behold when I used Win Key + R and typed in cmd the command window opened and stayed open, then I closed it using 'exit', then I start WAMP, and waited for the icon to turn green, then I tried the cmd again, and what d'ya know? the command window auto resied itself and quit, so I looked back at that registry setting and yep '& exit' was there again,,, so, this time I again erased it, and ran the cmd command a few times without running WAMP, and the console opened and stayed opened every time.



Edited 3 time(s). Last edit at 02/10/2018 12:56AM by usalabs.

Options: ReplyQuote
Re: WAMP messes up the windows 10 cmd.exe file
Posted by: Otomatic (Moderator)
Date: February 10, 2018 11:28AM

Hi,

Since the beginning of Wampserver 3, I have installed and uninstalled:

- Wampserver 3.0.0 32 bit 32 times on W7 and 16 times on W10
- Wampserver 3.0.0 64 bit 26 times on W7 and 15 times on W10
- Wampserver 3.0.4 32 bit 18 times on W7 and 12 times on W10
- Wampserver 3.0.4 64 bit 16 times on W7 and 13 times on W10
- Wampserver 3.0.6 32 bit 41 times on W7 and 25 times on W10
- Wampserver 3.0.6 64 bit 36 times on W7 and 19 times on W10
- Wampserver 3.1.0 32 bit 34 times on W7 and 20 times on W10
- Wampserver 3.1.0 64 bit 26 times on W7 and 18 times on W10

That is a total of 368 times (minus four uninstallations).
Not once have I seen the phenomenon you describe and yet I use the command windows a lot when I'm developing and checking Wampserver installation procedures.

When installing Wampserver, only two keys are written to the registry:
- 1 - The Wampserver uninstall key:
-- Wampserver 32 bit
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{wampserver32}_is1]
or with Windows 64 bit
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{wampserver32}_is1]
-- Wampserver 64 bit
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{wampserver64}_is1]
- 2 - The key indicating that Wampmanager is started as an administrator:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"J:\\wamp\\wampmanager.exe"="RUNASADMIN"
"J:\\wamp64\\wampmanager.exe"="RUNASADMIN"
And that's all!

When launching wampmanager.exe there are no writes or changes in the registry.
The only way to read, write or modify the registry with wampmanager.exe (Aestan Tray Menu) is to use variables Type: registry;. There are no such variables in wampmanager.tpl or wampmanager.ini. It is therefore impossible for wampmanager to write to the registry.

> HKEY_CURRENT_USER\Software\Microsoft\Command Processor -> AutoRun which held a value of '& exit'
This key is not written by Wampmanager.

One of the parameters for opening a command window is cmd.exe /D

/D Disables the execution of AutoRun from the Registry.

If /D has NOT been specified in the command line, then CMD.EXE will start by searching for the following REG_SZ/REG_EXPAND_SZ Registry variables and if one or both are present, they will be executed first
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

And, as you end up with Autorun = &Exit, the command window closes immediately.

The Autorun value is very often used by viruses or malware or even "non-standard" versions of Windows 10, for example specific to some PC providers.
I advise you to run your command windows from a shortcut created with in the properties:
- Target = C:\Windows\System32\cmd.exe /D
- Shorcut tag -> Advanced button -> Check Run as an administrator
OK - Applied - OK

If you look at the file changelog.txt or readme_update3. x. y.txt you will see a number of "Fix bug" or "Correct bug", which means I recognize the problems that are reported to me and do everything I can to fix them.
But I can't recognize a "problem" that has never been replicated in three years of developing and using Wampserver.

------------------------------------------------------------------------------------------------------------
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 »



Edited 2 time(s). Last edit at 02/10/2018 04:07PM by Otomatic.

Options: ReplyQuote


Sorry, only registered users may post in this forum.