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.

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

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .