vendredi 27 septembre 2019

Batch File with two conditions and a loop

Let us assume my only method of scripting is via a batch file.

I have a batch file with a long list of commands, however, I need to include two contingencies:

  • Needs to be on the domain (we'll use .com for this example)
  • Must have a non typical IP (meaning 192 is not used on the domain, but is used prior to joining and not 169 due to delay in DHCP assignment).

I'd prefer to keep this in the same batch file as the rest of the code. I've tried sewing together some commands, but usually get a syntax error. I am able to make the IP portion work, using %ERRORLEVEL% however, I can only figure out searching for a single IP mask.

Aucun commentaire:

Enregistrer un commentaire