mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:46:03 +00:00
Installer: Fallback to `copy" when "robocopy" fails, Part 2
This commit is contained in:
parent
a6ba0779dd
commit
afa91d7fcc
@ -10,13 +10,29 @@
|
|||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
|
|
||||||
robocopy "%SRCDIR%" "%DSTDIR%" "%FILENAME%" /R:0 >NUL || copy "%SRCPATH%" "%DSTPATH%"
|
|
||||||
|
@if not exist "%SystemRoot%\System32\robocopy.exe" @goto USE_COPY
|
||||||
|
|
||||||
|
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
|
||||||
@set RCODE=%ERRORLEVEL%
|
@set RCODE=%ERRORLEVEL%
|
||||||
@goto EXIT
|
@goto EXIT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@goto END_USE_COPY
|
||||||
|
|
||||||
|
:USE_COPY
|
||||||
|
|
||||||
|
copy "%SRCPATH%" "%DSTPATH%"
|
||||||
|
@if ERRORLEVEL 1 (
|
||||||
|
@echo Error: Cannot copy driver to system
|
||||||
|
@set RCODE=%ERRORLEVEL%
|
||||||
|
@goto EXIT
|
||||||
|
)
|
||||||
|
|
||||||
|
:END_USE_COPY
|
||||||
|
|
||||||
|
|
||||||
@rem Create the driver service
|
@rem Create the driver service
|
||||||
sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
|
sc create %DRIVERSVC% binPath= "%DSTPATH%" type= kernel start= auto ^
|
||||||
|
Loading…
Reference in New Issue
Block a user