0

I have a simple .bat script that I placed in startup folder (shell:startup). I use autologon to logon to windows user account automatically. The scripts starts apache, curls that the computer is running and runs some other processes. It is executed, but apache never starts, namely because it needs to be run as admin.

This is the script

start /d "C:\Apache24\bin" httpd.exe && curl -d "computer=running" -X POST https://notify.me/path && someother stuff

Steps need to be executed in the same order as the script implies.

So how do I start apache from startup folder without user interaction?

I tried using a scheduled task, but even after correcting priorities to normal, the processes that I start runs extremely slow when executed as task. Like 15x slower than if I start them interactively.

The other thing that I tried is to create a shortcut, and checked "Run as administrator" and placed that shortcut in startup folder. This time the script was never executed.

| improve this question | | | | |
  • Is there a reason you can't have Apache run as a service? – Dave Sep 26 '18 at 16:09
  • takes forever to start. also, I need to trigger curl after apache is running – potato Sep 26 '18 at 19:17
0

You can try/use hfs ( which is a single executable from rejetto - for windows )

this can be faster and better equipped to your need.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.