dot-source scriptblock
This commit is contained in:
@@ -190,7 +190,7 @@ goto dk_done
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';& ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a)
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
@@ -551,7 +551,7 @@ goto :oe_edition
|
||||
cls
|
||||
call :ch_getinfo
|
||||
call :oe_tempcleanup
|
||||
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';& ([scriptblock]::Create($f[1]))"
|
||||
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getlist\:.*';. ([scriptblock]::Create($f[1]))"
|
||||
|
||||
:oe_editionchange
|
||||
|
||||
@@ -625,7 +625,7 @@ cls
|
||||
set suites=
|
||||
echo %list% | find /i "Suites" %nul1% && (
|
||||
set suites=1
|
||||
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';& ([scriptblock]::Create($f[1]))"
|
||||
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getappnames\:.*';. ([scriptblock]::Create($f[1]))"
|
||||
if not exist %SystemRoot%\Temp\getAppIds.txt (
|
||||
%eline%
|
||||
echo Failed to generate available apps list.
|
||||
@@ -1103,7 +1103,7 @@ if not defined terminal mode 105, 32
|
||||
:: Get build number for the target FFN, using build number with OfficeC2RClient.exe command to trigger updates provides accurate results
|
||||
|
||||
set build=
|
||||
for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';& ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a)
|
||||
for /f "delims=" %%a in ('%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':getbuild\:.*';. ([scriptblock]::Create($f[1]))" %nul6%') do (set build=%%a)
|
||||
echo "%build%" | find /i "16." %nul% || set build=
|
||||
|
||||
echo:
|
||||
|
Reference in New Issue
Block a user