'sgminer.exe' is not recognized as an internal or external command,
operable program or batch file.
This is most likely because sgminer isn't located in the c:\windows\system32 directory (nor should it be); change to the directory where you put sgminer.exe and then try running it.
or it had something deleted due to a virus protection software.
I have a folder on my desktop {Mining software} I exclude it from all virus software.
in that folder is a second folder I call it {nested software} i exclude it from all virus software.
and in that folder I have all my mining software folders that double nested folder seems to prevent any bullshit from windows defender tor any other virus protection software