4

Has anyone seen this error on an XP desktop machine before?

'net' is not recognized as an internal or external command, operable program or batch file.

It's being used in a 'net start iisadmin' script

3 Answers 3

5

Sounds like your 'path' environmental variable is getting stomped on somewhere. The fix is to do a direct call to it like has been suggested above.

2
  • Why would that happen? Name collision?
    – KeyC0de
    Oct 22, 2020 at 18:30
  • 1
    @Nikos A name collision would not give you the 'command not found' error message, it would give you a syntax error for invalid command-line operations. The PATH env-var has been zeroed or otherwise modified for reasons unknown.
    – sysadmin1138
    Oct 23, 2020 at 13:21
6

Try looking for a file called net.exe in C:\WINDOWS\system32\

If it is there then try using an explicit path to the file in your script.

E.g.:

C:\WINDOWS\system32\net.exe start iisadmin

1

Yep, seen it more than once. Try using the full path and name to net.exe.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .