certify icon indicating copy to clipboard operation
certify copied to clipboard

[v5] Deployment Tasks: Run... command is run twice.

Open JLJTGR opened this issue 6 years ago • 4 comments

Version: 5.0.5.0

It seems that every post-deployment task using the "Run..." type is run twice. (didn't happen in previous versions)

2020-05-11 18:06:38.082 -04:00 [INF] ---- Performing Task [On-Demand or Manual Execution] :: Stop WAMP64 ----
2020-05-11 18:06:38.082 -04:00 [INF] Task [Stop WAMP64] :: Task will run for any status
2020-05-11 18:06:40.732 -04:00 [INF] The wampapache64 service is stopping.
The wampapache64 service was stopped successfully.


2020-05-11 18:06:40.732 -04:00 [ERR] Error: The wampapache64 service is not started.
Error: More help is available by typing NET HELPMSG 3521.
Warning: Script exited with the following ExitCode: 2

image

JLJTGR avatar May 11 '20 22:05 JLJTGR

Thanks Jacob, so this is a custom .bat script (using Run Script?) that only contains 'net stop wampache64'?

I wonder why 'net1' gets called during this?

The only changes I can think of were to add error reporting if the .bat command error, so perhaps that has caused something. I'll look into it.

webprofusion-chrisc avatar May 11 '20 23:05 webprofusion-chrisc

There are no scripts, just pointing to "C:\Windows\system32\net.exe". image

net1.exe is called by net.exe as shown in procmon. I don't know why they are separate executables. Maybe net1.exe is admin only and is used for privileged operations where plain net.exe can at least run without elevation? Anyways, that sequence is normal.

You can test it with ping.exe / 127.0.0.1 if you want an alternate test-case. The only difference is that both times ping runs it will return 0.

JLJTGR avatar May 11 '20 23:05 JLJTGR

Awesome, I'll check it out and assuming it can be reproduced it should get fixed today.

webprofusion-chrisc avatar May 12 '20 00:05 webprofusion-chrisc

Found it, yes it was literally running the script twice as suspected. In updating for the local service user I'd missed a later call for the same purpose, so if you ran it as a specific user it only ran once but of you ran it as the local service user it was running twice.

webprofusion-chrisc avatar May 12 '20 02:05 webprofusion-chrisc