mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:46:03 +00:00
Driver Scripts: Show command args or error
This commit is contained in:
parent
7d4b8a4bd8
commit
d830c0f8c9
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
@rem Copy driver to system storage
|
@rem Copy driver to system storage
|
||||||
@if exist "%DSTPATH%" (
|
@if exist "%DSTPATH%" (
|
||||||
@echo Error: Driver already installed. Uninstall it first
|
@echo Error: Driver already installed. Uninstall it first ("%DSTPATH%")
|
||||||
@set RCODE=1
|
@set RCODE=1
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL
|
robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL
|
||||||
@if ERRORLEVEL 2 (
|
@if ERRORLEVEL 2 (
|
||||||
@echo Error: Cannot copy driver to system
|
@echo Error: Cannot copy driver to system ("%SRCDIR%" "%DSTDIR%" "%FILENAME%")
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
@ -26,7 +26,7 @@ robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL
|
|||||||
|
|
||||||
copy "%SRCPATH%" "%DSTPATH%"
|
copy "%SRCPATH%" "%DSTPATH%"
|
||||||
@if ERRORLEVEL 1 (
|
@if ERRORLEVEL 1 (
|
||||||
@echo Error: Cannot copy driver to system
|
@echo Error: Cannot copy driver to system ("%SRCPATH%" "%DSTPATH%")
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
@ -38,7 +38,7 @@ copy "%SRCPATH%" "%DSTPATH%"
|
|||||||
sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
|
sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
|
||||||
group= "NetworkProvider" depend= BFE DisplayName= "%DISPNAME%"
|
group= "NetworkProvider" depend= BFE DisplayName= "%DISPNAME%"
|
||||||
@if ERRORLEVEL 1 (
|
@if ERRORLEVEL 1 (
|
||||||
@echo Error: Cannot create a service
|
@echo Error: Cannot create a service (%DRIVERSVC% "%DSTPATH%")
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
@ -46,7 +46,7 @@ sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
|
|||||||
@rem Start the driver service
|
@rem Start the driver service
|
||||||
sc start %DRIVERSVC%
|
sc start %DRIVERSVC%
|
||||||
@if ERRORLEVEL 1 (
|
@if ERRORLEVEL 1 (
|
||||||
@echo Error: Cannot start the service
|
@echo Error: Cannot start a service (%DRIVERSVC%)
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ sc stop %DRIVERSVC%
|
|||||||
@rem Remove the driver service
|
@rem Remove the driver service
|
||||||
sc delete %DRIVERSVC%
|
sc delete %DRIVERSVC%
|
||||||
@if ERRORLEVEL 1 (
|
@if ERRORLEVEL 1 (
|
||||||
@echo Error: Cannot delete the service
|
@echo Error: Cannot delete a service (%DRIVERSVC%)
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@rem @goto EXIT
|
@rem @goto EXIT
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user