2016-06: Retroactive Updates
* Don't load PowerShell profiles (-NoProfile) * This should reduce the startup time for most actions in WinPE * MCT Windows 10 isos no longer have "Technical Preview" in the names * make.cmd script simplified and now removes more language folders
This commit is contained in:
parent
919c4e73a2
commit
cf4092f57b
6 changed files with 13 additions and 44 deletions
|
|
@ -87,7 +87,7 @@ function menu-main {
|
||||||
Start-Process "$windir\System32\cmd.exe" -argumentlist @("-new_console:n") -WorkingDirectory "$WKPath"
|
Start-Process "$windir\System32\cmd.exe" -argumentlist @("-new_console:n") -WorkingDirectory "$WKPath"
|
||||||
return
|
return
|
||||||
} elseif ($selection -imatch '^P$') {
|
} elseif ($selection -imatch '^P$') {
|
||||||
Start-Process "$windir\System32\WindowsPowerShell\v1.0\powershell.exe" -argumentlist @("-ExecutionPolicy", "Bypass", "-new_console:n") -WorkingDirectory "$WKPath"
|
Start-Process "$windir\System32\WindowsPowerShell\v1.0\powershell.exe" -argumentlist @("-ExecutionPolicy", "Bypass", "-NoProfile", "-new_console:n") -WorkingDirectory "$WKPath"
|
||||||
return
|
return
|
||||||
} elseif ($selection -imatch '^[QRS]$') {
|
} elseif ($selection -imatch '^[QRS]$') {
|
||||||
wk-exit $selection
|
wk-exit $selection
|
||||||
|
|
|
||||||
|
|
@ -388,8 +388,8 @@ function menu-setup {
|
||||||
@{Name="Windows 8.1 Pro"; ImageFile="Win8"; ImageName="Windows 8.1 Pro"}
|
@{Name="Windows 8.1 Pro"; ImageFile="Win8"; ImageName="Windows 8.1 Pro"}
|
||||||
|
|
||||||
# The ISOs from the MediaCreationTool are apparently Technical Previews
|
# The ISOs from the MediaCreationTool are apparently Technical Previews
|
||||||
@{Name="Windows 10 Home"; ImageFile="Win10"; ImageName="Windows 10 Technical Preview"; CRLF=$true}
|
@{Name="Windows 10 Home"; ImageFile="Win10"; ImageName="Windows 10 Home"; CRLF=$true}
|
||||||
@{Name="Windows 10 Pro"; ImageFile="Win10"; ImageName="Windows 10 Pro Technical Preview"}
|
@{Name="Windows 10 Pro"; ImageFile="Win10"; ImageName="Windows 10 Pro"}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build menu and get selection
|
# Build menu and get selection
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Some common settings and functions
|
# Some common settings and functions
|
||||||
|
|
||||||
$host.UI.RawUI.BackgroundColor = "black"
|
$host.UI.RawUI.BackgroundColor = "black"
|
||||||
$host.UI.RawUI.ForegroundColor = "cyan"
|
$host.UI.RawUI.ForegroundColor = "white"
|
||||||
#$appdata = (gci env:appdata).value
|
#$appdata = (gci env:appdata).value
|
||||||
#$localappdata = (gci env:localappdata).value
|
#$localappdata = (gci env:localappdata).value
|
||||||
#$username = (gci env:username).value
|
#$username = (gci env:username).value
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
[LaunchApps]
|
[LaunchApps]
|
||||||
wpeinit
|
wpeinit
|
||||||
wpeutil updatebootinfo
|
wpeutil updatebootinfo
|
||||||
"%SystemDrive%\WK\ConEmu\ConEmu.exe", /cmd PowerShell -ExecutionPolicy Bypass "%SystemDrive%\WK\Scripts\WK.ps1" -new_console:n
|
"%SystemDrive%\WK\ConEmu\ConEmu.exe", /cmd PowerShell -ExecutionPolicy Bypass "%SystemDrive%\WK\Scripts\WK.ps1" -NoProfile -new_console:n
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ for %%f in (%*) do (
|
||||||
)
|
)
|
||||||
|
|
||||||
:LaunchMenu
|
:LaunchMenu
|
||||||
"%SystemDrive%\WK\ConEmu\ConEmu.exe" /cmd PowerShell -ExecutionPolicy Bypass "%SystemDrive%\WK\Scripts\WK.ps1" -new_console:n
|
"%SystemDrive%\WK\ConEmu\ConEmu.exe" /cmd PowerShell -ExecutionPolicy Bypass "%SystemDrive%\WK\Scripts\WK.ps1" -NoProfile -new_console:n
|
||||||
goto Done
|
goto Done
|
||||||
|
|
||||||
:Abort
|
:Abort
|
||||||
|
|
@ -28,4 +28,4 @@ goto Exit
|
||||||
:Exit
|
:Exit
|
||||||
echo.
|
echo.
|
||||||
popd
|
popd
|
||||||
endlocal
|
endlocal
|
||||||
|
|
|
||||||
43
make.cmd
43
make.cmd
|
|
@ -71,42 +71,11 @@ for %%a in (amd64 x86) do (
|
||||||
|
|
||||||
rem Copy main files
|
rem Copy main files
|
||||||
call copype.cmd !arch! "!pe_files!"
|
call copype.cmd !arch! "!pe_files!"
|
||||||
rmdir /s /q "!pe_files!\media\bg-bg"
|
for %%t in (bg-bg cs-cz da-dk de-de el-gr en-gb es-es es-mx et-ee fi-fi fr-ca fr-fr hr-hr hu-hu it-it ja-jp ko-kr lt-lt lv-lv nb-no nl-nl pl-pl pt-br pt-pt ro-ro ru-ru sk-sk sl-si sr-latn-cs sr-latn-rs sv-se tr-tr uk-ua zh-cn zh-hk zh-tw) do (
|
||||||
rmdir /s /q "!pe_files!\media\cs-cz"
|
rmdir /s /q "!pe_files!\media\%%t"
|
||||||
rmdir /s /q "!pe_files!\media\da-dk"
|
rmdir /s /q "!pe_files!\media\Boot\%%t"
|
||||||
rmdir /s /q "!pe_files!\media\de-de"
|
rmdir /s /q "!pe_files!\media\EFI\Microsoft\Boot\%%t"
|
||||||
rmdir /s /q "!pe_files!\media\el-gr"
|
)
|
||||||
rmdir /s /q "!pe_files!\media\en-gb"
|
|
||||||
rmdir /s /q "!pe_files!\media\es-es"
|
|
||||||
rmdir /s /q "!pe_files!\media\es-mx"
|
|
||||||
rmdir /s /q "!pe_files!\media\et-ee"
|
|
||||||
rmdir /s /q "!pe_files!\media\fi-fi"
|
|
||||||
rmdir /s /q "!pe_files!\media\fr-ca"
|
|
||||||
rmdir /s /q "!pe_files!\media\fr-fr"
|
|
||||||
rmdir /s /q "!pe_files!\media\hr-hr"
|
|
||||||
rmdir /s /q "!pe_files!\media\hu-hu"
|
|
||||||
rmdir /s /q "!pe_files!\media\it-it"
|
|
||||||
rmdir /s /q "!pe_files!\media\ja-jp"
|
|
||||||
rmdir /s /q "!pe_files!\media\ko-kr"
|
|
||||||
rmdir /s /q "!pe_files!\media\lt-lt"
|
|
||||||
rmdir /s /q "!pe_files!\media\lv-lv"
|
|
||||||
rmdir /s /q "!pe_files!\media\nb-no"
|
|
||||||
rmdir /s /q "!pe_files!\media\nl-nl"
|
|
||||||
rmdir /s /q "!pe_files!\media\pl-pl"
|
|
||||||
rmdir /s /q "!pe_files!\media\pt-br"
|
|
||||||
rmdir /s /q "!pe_files!\media\pt-pt"
|
|
||||||
rmdir /s /q "!pe_files!\media\ro-ro"
|
|
||||||
rmdir /s /q "!pe_files!\media\ru-ru"
|
|
||||||
rmdir /s /q "!pe_files!\media\sk-sk"
|
|
||||||
rmdir /s /q "!pe_files!\media\sl-si"
|
|
||||||
rmdir /s /q "!pe_files!\media\sr-latn-cs"
|
|
||||||
rmdir /s /q "!pe_files!\media\sr-latn-rs"
|
|
||||||
rmdir /s /q "!pe_files!\media\sv-se"
|
|
||||||
rmdir /s /q "!pe_files!\media\tr-tr"
|
|
||||||
rmdir /s /q "!pe_files!\media\uk-ua"
|
|
||||||
rmdir /s /q "!pe_files!\media\zh-cn"
|
|
||||||
rmdir /s /q "!pe_files!\media\zh-hk"
|
|
||||||
rmdir /s /q "!pe_files!\media\zh-tw"
|
|
||||||
|
|
||||||
rem Mount Image
|
rem Mount Image
|
||||||
mkdir "!mount!"
|
mkdir "!mount!"
|
||||||
|
|
@ -136,7 +105,7 @@ for %%a in (amd64 x86) do (
|
||||||
dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\en-us\WinPE-DismCmdlets_en-us.cab" /logpath:"dism.log"
|
dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\en-us\WinPE-DismCmdlets_en-us.cab" /logpath:"dism.log"
|
||||||
|
|
||||||
rem Install WinPE-WMI, WinPE-NetFX, WinPE-Scripting, and WinPE-PowerShell before you install WinPE-SecureBootCmdlets.
|
rem Install WinPE-WMI, WinPE-NetFX, WinPE-Scripting, and WinPE-PowerShell before you install WinPE-SecureBootCmdlets.
|
||||||
dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\WinPE-SecureBootCmdlets.cab" /logpath:"dism.log"
|
rem dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\WinPE-SecureBootCmdlets.cab" /logpath:"dism.log"
|
||||||
|
|
||||||
rem Install WinPE-WMI, WinPE-NetFX, WinPE-Scripting, and WinPE-PowerShell before you install WinPE-StorageWMI.
|
rem Install WinPE-WMI, WinPE-NetFX, WinPE-Scripting, and WinPE-PowerShell before you install WinPE-StorageWMI.
|
||||||
dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\WinPE-StorageWMI.cab" /logpath:"dism.log"
|
dism /add-package /image:"!mount!" /packagepath:"!winpe_ocs!\WinPE-StorageWMI.cab" /logpath:"dism.log"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue