I'm trying to make a batch file which is waiting for 6 packets ping from a certain ip from the network. When the machine receives the 6 echo requests should shutdown automatically. I will make this batch file to run at startup as a service, i dont need help for this part. Can anyone help me with the listening part ?
Related Questions in BATCH-FILE
- .bat file - How can I return the value of a variable whose name depends on another variable concatenated with a string in a batch file?
- Discordbot(Python) who should start bat file(Minecraft server) can't find user_jvm_args.txt file
- Set req query output to a variable
- bat file creates a "corrupt" zip
- How to list several items in the dialog box for execution?
- "if contains" with forbidden special characters
- Overlaying frame number with ffmpeg
- Batch Script-Powershell MessageBox | How do I set TopMost within PS command line of Batch?
- Batch file no longer works correctly in Windows 11
- Trying to launch batch file from powershell, and immediately closes
- How to automate an SSH login with a batch file?
- Having trouble executing my program from a jar, using Jinput
- How can I unload Visual Studio projects via batch file/developer command prompt?
- How to use goto in nested loop in .bat script window
- How can I run this Powershell function from a batch file on windows?
Related Questions in PING
- How can we make an environment specific Token-based authorization using Ping Token?
- Can't ping to 8.8.8.8 and google.com in beaglebone black
- how calculate: mean, standard deviation , coefficient for each ip ping , traceroute
- How to "make" a variable that contains another variable value?
- How to run automatically a command in the CMD after starting it as a process (using C#)
- Ping from a public EC2 instance
- how to perform a Ping flood attack / ICMP flood attack demonstration?
- Not able to connect to an IP from databricks notebook in azure
- Cannot ping server 1 from pc 1 in packet tracer file by setting default route on all 3 routers connected with serial DTE cables
- ModuleNotFoundError, while running a python script as root user in Ubuntu
- Flutter app unable to resolve hostname for ping operation
- Why does my genymotion emulator show 127.0.0.1:6555 on its top window border, rather than a real IP address?
- OIDC enabled web apps prompting for re-authentication although logged in first application initially
- Python library to send pings that doesn't require elevated permissions?
- Resolving NoneType.__format__ Error in a Python UDP Ping Function
Related Questions in SHUTDOWN
- Unexpected OS Shutdown
- weblogic abruptly stopped during deployment with fatal error
- Error message on shutdown - from unshown winform
- Metatrader 5 closes after initialization
- How can I find out when the computer shuts down after executing the shutdown command?
- Timing issue while looping over the testing tool command line process
- Android Dumpsys - How to obtain power on/off data from a year ago
- Close Tauri window without closing the entire app
- What is the most appropriate way to shutdown the host system from within docker
- MariaDB always displays message Erorr:MySQL shutdown unexpectedly
- Get last Windows/PC shutdown time with VBA
- Preventing DLLHost Process Shutdown or Keeping Explorer Window Responsive during Long-Running IExplorerCommand::Invoke Operation in C++
- Will my heroku app be affected by adminium shutdown?
- In Swift on macOS, how can I properly catch the powerdown event from NotificationCenter?
- Powershell Script - Shutdown PC after set idle time
Related Questions in PACKETS
- Docker compose and out-of-order TCP packets
- C creating a raw UDP packet
- he value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true'
- Packets drop at Open vSwitch
- create scapy packet protocol with reuse of payload for more than one fields
- How to send packet to client with private ip?
- Sniffing Facebook chats with Wireshark
- recvfrom only receive few packets after that it goes in waiting state
- ip4 packet assembled as ip6 - libnet
- RAW Sockets in C++ Windows
- Weighted Round Robin after queue is empty
- Golang cannot send packets to stun received ip
- How do i know which url a packet is going to or coming from in python
- Golang send and receive udp packets simultaneously
- Get Client Hello from Wireshark
Related Questions in LISTEN
- Laravel Livewire 3 dispatch not working with laravel echo private
- Android listen_call_state
- StateProvider gets updated but ref.listen does not triggers
- Flutter - missing data while socket listen
- Listening to keyboard outside node JS terminal
- How do I activate a toggle button in Tableview if I select a row using JavaFX?
- Nodejs on IIS listen port and default file issues
- Perform function after notify in postgresql
- I am getting an error in my terminal lias command not found
- i have installed npm globally, nodemon, , express aftering running my index.js file am getting error -13 and am using codesandbox its virtual IDE
- Is it possible to write a generic trigger for all tables in Postgres?
- python 'listen' creates established socket. why?
- Flutter wait for listen() function
- SQL Server - how to listen for table changes
- How to make jQuery constantly watch for event instead of onClick
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
As an alternative, why not create a file in a special place (perhaps even with special content) that the "listening" script constantly looks for, and as soon as it exists, deletes the file and shuts the machine down?
This could at least be done in batch.
Windows has no native sleep command. An alternative strategy that others have thought of that have less overhead than PowerShell (though, since it's just sleeping, the overhead probably doesn't matter) is to ping the localhost adapter times (e.g.
ping -n 60 127.0.0.1).Of course, the whole script could be written in PowerShell, but then you would have to fiddle with ExecutionPolicy and other things.