In short: What I need is a way to find UUID of network connection "xyz" from a batch-file.
I'm trying to setup a script that will place a scheduled task on the current user. I intend to send this script to multiple persons and therefor need it to be fully automatic. This task has to run only when connected to a specific network.
What I have done:
- Created the task I want in
Task Schedulerand exported it to use it as a template for the task I want to import with the script. - Set the script to replace certain values in the template with user specific details.
The problem I have is with finding the UUID that task scheduler uses when setting Start only if the following network connection is availiable. From what I've found this is not the same UUID as the network interface UUID.
The exported XML-file for this option looks like this:
<NetworkSettings>
<Name>AndoidAP</Name>
<Id>{some-random-UUID-here}</Id>
</NetworkSettings>
In the example I've used AndroidAP which would be a wireless device. The real case would be a wired connection. Don't know if this makes any difference?
Any help or suggestions would be greatly appreciated!




wevtutillists the GUID if not formated as text (ie. formated as XML). Working with strings in batch is such a pain so I'm working on a .vbs script to extract the GUID from the output of wevtutil. This vbs script I plan to create from the batch-script and delete once done. I'll post my solution as soon as I get time to finish it. – Klinghust Sep 30 '17 at 21:49UUIDyou capture via some CLI and batch script or vbs script? I have a simple idea that may be able to help but I'd like to hear back from you first if possible. – Vomit IT - Chunky Mess Style Sep 30 '17 at 22:56\\server\sharetoo correct? I'll test some ideas with batch to see if there can be a couple checks before running the script. – Vomit IT - Chunky Mess Style Oct 01 '17 at 13:28