diff options
| author | WindowsAddict | 2023-09-25 13:46:19 +0000 |
|---|---|---|
| committer | WindowsAddict | 2023-09-25 13:46:19 +0000 |
| commit | e81490b89c55d7b0477da6e72db36e13f2b15f63 (patch) | |
| tree | f023e744df4fd0d940036b41bed45b1a7ee337bb /MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd | |
| parent | 306372d5a252ab705282ba7c69985031badcae1f (diff) | |
| download | Microsoft-Activation-Scripts-e81490b89c55d7b0477da6e72db36e13f2b15f63.zip | |
1.91.9
Diffstat (limited to 'MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd')
| -rw-r--r-- | MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd b/MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd index 2df64ec..f5eb509 100644 --- a/MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd +++ b/MAS/Separate-Files-Version/Check-Activation-Status-wmi.cmd @@ -67,12 +67,11 @@ set "Path=%SystemRoot%\Sysnative;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnat :: Check LF line ending
pushd "%~dp0"
->nul findstr /rxc:".*" "%~nx0"
-if not %errorlevel%==0 (
+>nul findstr /v "$" "%~nx0" && (
echo:
-echo Error: Script either has LF line ending issue, or it failed to read itself.
+echo Error: Script either has LF line ending issue or an empty line at the end of the script is missing.
echo:
-ping 127.0.0.1 -n 6 > nul
+ping 127.0.0.1 -n 6 >nul
popd
exit /b
)
@@ -536,4 +535,5 @@ PrintLicensesInformation -Mode "NUL" Write-Host
PrintLicensesInformation -Mode "Device"
:vNextDiag:
-::===================================================
\ No newline at end of file +::===================================================
+:: Leave empty line below
|
