Windows 10 1809 Upgrade Scripts are incorrect

I do not need a solution (just sharing information)

I’m testing the latest scripts to upgrade from Windows 10 1803 to Windows 10 1809 using the scripts located here: https://support.symantec.com/en_US/article.HOWTO125015.html

In my testing, I discovered that the scripts (SED_Win8_10_Upgrade_SED_10.4.2_MP1_RS5.zip and SED_Win7_Upgrade_SED_10.4.2_MP1_RS5.zip) don’t work.  Sepcifically, there’s a line of code that’s incorrect in WinRS5-upgrade-SED1042MP1.cmd

For anyone else running into this problem, below is the broken code with what needs to be changed:

Incorrect:

REM check if all drivers are available
set driverslist=PGPsdk PGPwded
for %%b in (%driverslist%) do (
	REM Check for Driver files
	IF NOT EXIST "%driverdir%%%b.sys" (
		echo -----------------
		echo "%driverdir%%%b.sys" file missing...
		GOTO drivermissing
	)
	REM Check for Driver installer files
	IF NOT EXIST "%driverdir%%%b.inf" (
		echo -----------------
		echo "%driverdir%%%b.inf" file missing...
		GOTO drivermissing
	)
	REM copy required files to the upgrade folder
	copy /Y "%driverdir%%%b.*" "%PGPTempPath%."
	IF %ERRORLEVEL% NEQ 0 GOTO cpyfailed
)

Correct:

REM check if all drivers are available
set driverslist=PGPsdk PGPwded
for %%b in (%driverslist%) do (
	REM Check for Driver files
	IF NOT EXIST "%driverdir%%%b.sys" (
		echo -----------------
		echo "%driverdir%%%b.sys" file missing...
		GOTO drivermissing
	)
	REM Check for Driver installer files
	IF NOT EXIST "%driverdir%%%b.inf" (
		echo -----------------
		echo "%driverdir%%%b.inf" file missing...
		GOTO drivermissing
	)
	REM copy required files to the upgrade folder
	copy /Y "%driverdir%%%b.*" "%PGPTempPath%."
	IF !ERRORLEVEL! NEQ 0 GOTO cpyfailed
)

%ERRORLEVEL% should be !ERRORLEVEL!

The way Symantec has it coded, %ERRORLEVEL% during that loop reads out as 128 which causes the script to always go to “cpyfailed”.

0

Related:

  • No Related Posts

Leave a Reply