Batch file in windows environment.

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
PVerburg
Posts: 7
Joined: Sunday 16 July 2017 6:03
Target OS: Windows
Domoticz version:
Contact:

Batch file in windows environment.

Post by PVerburg »

I have been reading for days and am lost on what is supported under script:\\ in a windows environment.
can I call a batch file don't look like it, do I have to use lua to call cmd/batch.
Or is there no support under windows/dos OS.

I'm not strong in unix and run some dos only based sensors "watts clever" power meter so like to stay with windows at this stage.

Thanks,

Paul V.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Batch file in windows environment.

Post by waaren »

PVerburg wrote: Sunday 09 June 2019 23:54 I have been reading for days and am lost on what is supported under script:\\ in a windows environment.
can I call a batch file
Yes you can. Do this from the On/Off actions fields and use something like

Code: Select all

script://c:\users\<user name>\<bat name>.bat
windows.png
windows.png (46.41 KiB) Viewed 1253 times

Code: Select all

C:\Users\XXXX>more ff.bat
timeout 8
echo hi > c:\users\XXXX\ff.txt

C:\Users\XXXX>more ff.txt
hi

C:\Users\XXXX>dir ff.txt
 Volume in drive C has no label.
 Volume Serial Number is FCAE-F424

 Directory of C:\Users\XXXX

10-06-2019  00:06                 5 ff.txt
               1 File(s)              5 bytes
               0 Dir(s)  40.349.782.016 bytes free
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
PVerburg
Posts: 7
Joined: Sunday 16 July 2017 6:03
Target OS: Windows
Domoticz version:
Contact:

Re: Batch file in windows environment.

Post by PVerburg »

Thanks, that worked the problem was that the sound command won't work when called in a batch file like that.
will experiment with different options i'm sure i will find the cause.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests