Driver Scripts: Show command args or error

This commit is contained in:
Nodir Temirkhodjaev 2024-08-13 10:54:23 +05:00
parent 7d4b8a4bd8
commit d830c0f8c9
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
@rem Copy driver to system storage
@if exist "%DSTPATH%" (
@echo Error: Driver already installed. Uninstall it first
@echo Error: Driver already installed. Uninstall it first ("%DSTPATH%")
@set RCODE=1
@goto EXIT
)
@ -15,7 +15,7 @@
robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL
@if ERRORLEVEL 2 (
@echo Error: Cannot copy driver to system
@echo Error: Cannot copy driver to system ("%SRCDIR%" "%DSTDIR%" "%FILENAME%")
@set RCODE=%ERRORLEVEL%
@goto EXIT
)
@ -26,7 +26,7 @@ robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL
copy "%SRCPATH%" "%DSTPATH%"
@if ERRORLEVEL 1 (
@echo Error: Cannot copy driver to system
@echo Error: Cannot copy driver to system ("%SRCPATH%" "%DSTPATH%")
@set RCODE=%ERRORLEVEL%
@goto EXIT
)
@ -38,7 +38,7 @@ copy "%SRCPATH%" "%DSTPATH%"
sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
group= "NetworkProvider" depend= BFE DisplayName= "%DISPNAME%"
@if ERRORLEVEL 1 (
@echo Error: Cannot create a service
@echo Error: Cannot create a service (%DRIVERSVC% "%DSTPATH%")
@set RCODE=%ERRORLEVEL%
@goto EXIT
)
@ -46,7 +46,7 @@ sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
@rem Start the driver service
sc start %DRIVERSVC%
@if ERRORLEVEL 1 (
@echo Error: Cannot start the service
@echo Error: Cannot start a service (%DRIVERSVC%)
@set RCODE=%ERRORLEVEL%
@goto EXIT
)

View File

@ -14,7 +14,7 @@ sc stop %DRIVERSVC%
@rem Remove the driver service
sc delete %DRIVERSVC%
@if ERRORLEVEL 1 (
@echo Error: Cannot delete the service
@echo Error: Cannot delete a service (%DRIVERSVC%)
@set RCODE=%ERRORLEVEL%
@rem @goto EXIT
)