Executing a HA script with a batch-file on windows 11

Hi everyone,
I would like to execute a HA script called “script.muziekinstallatie” when my windows 11 PC boots. I was thinking to use a batch file to execute the scripts, but how? Thanks in advance,
John.

I assume you mean when HA starts as else you could just use the MS functionalities with pc reboot.
There is a automation trigger for HA on start and then you can use other actions to execute the script?

Hi,

If I were doing this … install curl for windows, create a batch job to hit the API

but as @vingerha hints … is home assistant installed locally on the machine or is it external ?

Yes I want to use the script in the MS functionalities, but I don’t know how to make the script. HA is externally installed.

Just create a ping sensor to detect if the W11 machine is online, and launch the script when it is up?

Sounds good to me. However, I’m quite new in HA. Can you explain how to setup a ping sensor?

Go to Settings / Devices & Services / Integrations and add Ping (ICMP)