0
I've got SYSTEMINFO | FIND /I "DOMAIN:" which displays if it's part of a Domain or Workgroup. But I'm trying to figure out how to take the result of that and if it's anything other than Company.LLC to goto :JoinWorkgroup. I would imagine it should look something like this:
IF SYSTEMINFO | FIND /I "DOMAIN:" NOT = "Company.LLC" THEN GOTO :JoinWorkgroup
IF SYSTEMINFO | FIND /I "DOMAIN:" = "Company.LLC" THEN GOTO :NextVerification
I can get IF NOT EXIST to work with directories, but can't figure out how to tie it into results of prompt utilities.
Are you confined to batch files? If not, I'd recommend going with PowerShell instead. You'll end up with cleaner files and it'll be easier to follow the logic. – Thor – 2015-02-09T18:40:28.553
Yeah, sort of am. I have a "sophisticated" batch that does a number of things in order. To call a powershell script might introduce some problems. Thanks for the response! – Sandfrog – 2015-02-10T16:06:52.190