Error: 'Program is not recognized as an internal or external command, operable program or batch file (9009)' when deploying patches


PROBLEM

When deploying patches during a remediation, all patches fail to install with the error:
 
"Program is not recognized as an internal or external command, operable program or batch file (9009)" (in GFI LanGuard 2014 R2 - build 20140512 and later)
 
OR...

"DNS server not authoritative for zone" (in previous versions)


ENVIRONMENT

  • GFI LanGuard  
  • All supported environments


SOLUTION

Check the following as a possible solution:
  1. Go to Control Panel > System and Security > and click Advanced system settings
  2. Click the Environment Variables...  button
  3. Find the Path System variable, highlight it and click the Edit... button
  4. Make sure it has %SystemRoot%\System32; in the variable value. If it is missing add it and click OK. Then skip to step 7. Otherwise, continue with step 5.
  5. Copy the entire Variable value,, paste it into a text file and replace the Variable value temporarily with some other value and click OK
  6. Edit the value again, paste the saved original value in its place and click OK
  7. Test by launching msiexec.exe /? from the Start > Run line or the command prompt
 
User-added image

If you have many computers in your domain with this issue, you can set this by group policy with instructions from the following Microsoft article: Configure an Environment Variable Item


CAUSE

The %SystemRoot%\System32 value is not part of the system PATH variable or there is a problem with the Operating System when expanding the %SystemRoot%\System32 to C:\Windows\system32.