Hello, Everyone, I found two very similar one-liners as part of the solution to WMI issues in SCCM client installation:
1.) from https://www.virtuallyboring.com/microsoft-wmi-invalid-class-error-0x80041010/
dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s
2.) from https://blogs.technet.microsoft.com/yongrhee/2016/06/23/wmi-stop-hurting-yourself-by-using-for-f-s-in-dir-s-b-mof-mfl-do-mofcomp-s/
dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %%s in (moflist.txt) do mofcomp %%s
What's the difference between the two? I used the line from link #2 (%%s), but I got the error "%%s was unexpected at this time." I understand from other posts that using "%%s" in batch files will not yield errors. When I used the line from link #1 (%s), the command ran.
If both lines get executed successfully, whether via CMD or BAT files, would they have the same end result?
Thank you very much.