2015-12: Retroactive Updates
This commit is contained in:
parent
18c2c4a961
commit
c7b5abb0bc
8 changed files with 227 additions and 169 deletions
|
|
@ -95,7 +95,7 @@ ShellUseSystemMRU=1
|
|||
15=#B000B0
|
||||
16=#B28B40
|
||||
[Styles]
|
||||
Use2ndDefaultStyle=1
|
||||
Use2ndDefaultStyle=0
|
||||
DefaultScheme=0
|
||||
AutoSelect=1
|
||||
SelectDlgSizeX=304
|
||||
|
|
@ -113,19 +113,12 @@ SelectDlgSizeY=324
|
|||
2nd Caret (Color, Size 1-3)=fore:#C0C0C0
|
||||
2nd Long Line Marker (Colors)=fore:#404040
|
||||
2nd Extra Line Spacing (Size)=
|
||||
[Window]
|
||||
1440x900 PosX=600
|
||||
1440x900 PosY=16
|
||||
1440x900 SizeX=824
|
||||
1440x900 SizeY=824
|
||||
1440x900 Maximized=1
|
||||
1600x900 PosX=756
|
||||
1600x900 PosY=16
|
||||
1600x900 SizeX=828
|
||||
1600x900 SizeY=828
|
||||
1600x900 Maximized=1
|
||||
800x600 PosX=216
|
||||
800x600 PosY=16
|
||||
800x600 SizeX=568
|
||||
800x600 SizeY=568
|
||||
800x600 Maximized=0
|
||||
[Recent Files]
|
||||
01=
|
||||
02=
|
||||
[Recent Find]
|
||||
01=
|
||||
02=
|
||||
[Recent Replace]
|
||||
01=
|
||||
02=
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ function mount-servers {
|
|||
# Mount servers
|
||||
wk-write "Connecting to backup server(s)"
|
||||
foreach ($_server in $backup_servers) {
|
||||
if (test-connection $_server.ip -count 1 -quiet) {
|
||||
if (test-connection $_server.ip -count 1 -quiet 2>&1 | out-null) {
|
||||
try {
|
||||
$_path = "\\{0}\{1}" -f $_server.ip, $_server.path
|
||||
$_drive = "{0}:" -f $_server.letter
|
||||
|
|
@ -195,39 +195,79 @@ function menu-imaging {
|
|||
pause
|
||||
## WARNING
|
||||
|
||||
# Check if any source drives were detected
|
||||
$disks = get-disk | where {$_.Size -ne 0}
|
||||
# if ($disks.count -eq 0) {
|
||||
# wk-error "No suitable source drives were detected."
|
||||
# pause "Press Enter to return to main menu... " $True
|
||||
# return 1
|
||||
# }
|
||||
|
||||
# Mount server(s)
|
||||
mount-servers
|
||||
|
||||
# Select destination
|
||||
# Build server menu
|
||||
$avail_servers = @(gdr | where {$_.DisplayRoot -imatch '\\\\'})
|
||||
$menu_disc_imaging = "Which drive are we imaging?`r`n`r`n"
|
||||
# if ($avail_servers.count -eq 0) {
|
||||
# wk-error "No suitable backup servers were detected."
|
||||
# pause "Press Enter to return to main menu... " $True
|
||||
# return 1
|
||||
# }
|
||||
$menu_imaging_server = "Where are we saving the backup image(s)?`r`n`r`n"
|
||||
$valid_answers = @("M", "m")
|
||||
for ($i=0; $i -lt $avail_servers.length; $i++) {
|
||||
$valid_answers += ($i + 1)
|
||||
$menu_disc_imaging += ("{0}: {1} ({2:N2} Gb free)`r`n" -f ($i + 1), $avail_servers[$i].Description, ($avail_servers[$i].Free / 1Gb))
|
||||
$menu_imaging_server += ("{0}: {1} ({2:N2} Gb free)`r`n" -f ($i + 1), $avail_servers[$i].Description, ($avail_servers[$i].Free / 1Gb))
|
||||
}
|
||||
$menu_disc_imaging += "`r`n"
|
||||
$menu_disc_imaging += "M: Main Menu`r`n"
|
||||
$menu_disc_imaging += "`r`n"
|
||||
$menu_disc_imaging += "Please make a selection`r`n"
|
||||
$menu_imaging_server += "`r`n"
|
||||
$menu_imaging_server += "M: Main Menu`r`n"
|
||||
$menu_imaging_server += "`r`n"
|
||||
$menu_imaging_server += "Please make a selection`r`n"
|
||||
|
||||
# Select server
|
||||
do {
|
||||
clear
|
||||
$answer = read-host -prompt $menu_disc_imaging
|
||||
##testing## clear
|
||||
$answer = read-host -prompt $menu_imaging_server
|
||||
} until ($valid_answers -contains $answer)
|
||||
if ($answer -imatch '^M$') {
|
||||
# Exit if requested
|
||||
unmount-servers
|
||||
popd
|
||||
return
|
||||
} else {
|
||||
$answer -= 1
|
||||
$dest_backup_server = $avail_servers[$answer]
|
||||
}
|
||||
|
||||
# Build source menu
|
||||
$menu_imaging_source = "For which drive are we creating backup image(s)?`r`n`r`n"
|
||||
$valid_answers = @("M", "m")
|
||||
foreach ($_ in $disks) {
|
||||
$valid_answers += $_.DiskNumber
|
||||
$menu_imaging_source += "{0}: {1:N0} Gb`t({2}) {3} ({4})`r`n" -f $_.DiskNumber, ($_.Size / 1GB), $_.BusType, $_.FriendlyName, $_.PartitionStyle
|
||||
}
|
||||
$menu_imaging_source += "`r`n"
|
||||
$menu_imaging_source += "M: Main Menu`r`n"
|
||||
$menu_imaging_source += "`r`n"
|
||||
$menu_imaging_source += "Please make a selection`r`n"
|
||||
|
||||
# Select source
|
||||
do {
|
||||
##testing## clear
|
||||
$answer = read-host -prompt $menu_imaging_source
|
||||
} until ($valid_answers -contains $answer)
|
||||
|
||||
if ($answer -imatch '^M$') {
|
||||
# Exit if requested
|
||||
return
|
||||
} else {
|
||||
##TODO##
|
||||
get-volume
|
||||
}
|
||||
|
||||
# Service Order
|
||||
$menu_service_order += "Please enter the service order`r`n"
|
||||
do {
|
||||
clear
|
||||
##testing## clear
|
||||
$service_order = read-host -prompt $menu_service_order
|
||||
} until ($service_order -imatch '^\d[\w\-]+$')
|
||||
|
||||
|
|
@ -242,7 +282,14 @@ function menu-imaging {
|
|||
function menu-setup {
|
||||
wk-write "Windows Setup"
|
||||
wk-write ""
|
||||
pushd $WKPath\Setup
|
||||
|
||||
# Check if any destination drives were detected
|
||||
$disks = get-disk | where {$_.Size -ne 0 -and $_.BusType -inotmatch 'USB'}
|
||||
if ($disks.count -eq 0) {
|
||||
wk-error "No suitable destination drives were detected."
|
||||
pause "Press Enter to return to main menu... " $True
|
||||
return 1
|
||||
}
|
||||
|
||||
# Build windows menu
|
||||
$windows_versions = @(
|
||||
|
|
@ -267,13 +314,12 @@ function menu-setup {
|
|||
|
||||
# Select Windows version
|
||||
do {
|
||||
clear
|
||||
##testing## clear
|
||||
$answer = read-host -prompt $menu_setup_windows
|
||||
} until ($valid_answers -contains $answer)
|
||||
|
||||
if ($answer -imatch '^M$') {
|
||||
# Exit if requested
|
||||
popd
|
||||
return
|
||||
} else {
|
||||
$answer -= 1
|
||||
|
|
@ -283,7 +329,6 @@ function menu-setup {
|
|||
# Build disk menu
|
||||
$menu_setup_disk = "To which drive are we installing {0}?`r`n`r`n" -f $dest_windows_version.Name
|
||||
$valid_answers = @("M", "m")
|
||||
$disks = get-disk | where {$_.Size -ne 0 -and $_.BusType -inotmatch 'USB'}
|
||||
foreach ($_ in $disks) {
|
||||
$valid_answers += $_.DiskNumber
|
||||
$menu_setup_disk += "{0}: {1:N0} Gb`t({2}) {3}`r`n" -f $_.DiskNumber, ($_.Size / 1GB), $_.PartitionStyle, $_.FriendlyName
|
||||
|
|
@ -295,13 +340,12 @@ function menu-setup {
|
|||
|
||||
# Select disk
|
||||
do {
|
||||
clear
|
||||
##testing## clear
|
||||
$answer = read-host -prompt $menu_setup_disk
|
||||
} until ($valid_answers -contains $answer)
|
||||
|
||||
if ($answer -imatch '^M$') {
|
||||
# Exit if requested
|
||||
popd
|
||||
return
|
||||
} else {
|
||||
# Double check before deleting data
|
||||
|
|
@ -365,13 +409,12 @@ function menu-setup {
|
|||
pause "Press Enter to return to main menu... "
|
||||
}
|
||||
}
|
||||
popd
|
||||
}
|
||||
function menu-tools {
|
||||
wk-write "Misc Tools"
|
||||
wk-write ""
|
||||
wk-warn "Be careful."
|
||||
start "explorer" -argumentlist @("$WKPath\Programs")
|
||||
start "$WKPath\explorer++" -argumentlist @("$WKPath")
|
||||
wk-exit
|
||||
}
|
||||
function menu-main {
|
||||
|
|
@ -391,10 +434,10 @@ Please make a selection
|
|||
"@
|
||||
|
||||
do {
|
||||
clear
|
||||
##testing## clear
|
||||
$answer = read-host -prompt $menu_main
|
||||
} until ($answer -imatch '^[123QRS]$')
|
||||
clear
|
||||
##testing## clear
|
||||
|
||||
if ($answer.GetType().Name -match "String") {
|
||||
$answer = $answer.ToUpper()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Some common settings and functions
|
||||
|
||||
$host.UI.RawUI.BackgroundColor = "black"
|
||||
$host.UI.RawUI.ForegroundColor = "green"
|
||||
$host.UI.RawUI.ForegroundColor = "cyan"
|
||||
$systemdrive = (gci env:systemdrive).value
|
||||
$WKPath = "$systemdrive\WK"
|
||||
$date = get-date -uformat "%Y-%m-%d"
|
||||
|
|
@ -42,7 +42,11 @@ function wk-write {
|
|||
out-file -filepath $log -inputobject $text -append
|
||||
}
|
||||
function pause {
|
||||
param([string]$message = "Press Enter to continue... ")
|
||||
write-host $message
|
||||
param([string]$message = "Press Enter to continue... ", [bool]$warning = $False)
|
||||
if ($warning) {
|
||||
write-host ($message) -foreground "yellow"
|
||||
} else {
|
||||
write-host ($message)
|
||||
}
|
||||
$x = read-host
|
||||
}
|
||||
|
|
|
|||
112
WK/config.xml
Normal file
112
WK/config.xml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Preference file for Explorer++ -->
|
||||
<ExplorerPlusPlus>
|
||||
<Settings>
|
||||
<Setting name="AllowMultipleInstances">yes</Setting>
|
||||
<Setting name="AlwaysOpenInNewTab">no</Setting>
|
||||
<Setting name="AlwaysShowTabBar">yes</Setting>
|
||||
<Setting name="AutoArrangeGlobal">yes</Setting>
|
||||
<Setting name="CheckBoxSelection">no</Setting>
|
||||
<Setting name="CloseMainWindowOnTabClose">yes</Setting>
|
||||
<Setting name="ConfirmCloseTabs">no</Setting>
|
||||
<Setting name="DisableFolderSizesNetworkRemovable">no</Setting>
|
||||
<Setting name="DisplayCentreColor" r="255" g="255" b="255"/>
|
||||
<Setting name="DisplayFont" Height="-13" Width="0" Weight="500" Italic="no" Underline="no" Strikeout="no" Font="Segoe UI"/>
|
||||
<Setting name="DisplaySurroundColor" r="0" g="94" b="138"/>
|
||||
<Setting name="DisplayTextColor" r="0" g="0" b="0"/>
|
||||
<Setting name="DisplayWindowHeight">90</Setting>
|
||||
<Setting name="DoubleClickTabClose">yes</Setting>
|
||||
<Setting name="ExtendTabControl">no</Setting>
|
||||
<Setting name="ForceSameTabWidth">no</Setting>
|
||||
<Setting name="ForceSize">no</Setting>
|
||||
<Setting name="HandleZipFiles">no</Setting>
|
||||
<Setting name="HideLinkExtensionGlobal">no</Setting>
|
||||
<Setting name="HideSystemFilesGlobal">no</Setting>
|
||||
<Setting name="InfoTipType">0</Setting>
|
||||
<Setting name="InsertSorted">yes</Setting>
|
||||
<Setting name="Language">9</Setting>
|
||||
<Setting name="LargeToolbarIcons">no</Setting>
|
||||
<Setting name="LastSelectedTab">0</Setting>
|
||||
<Setting name="LockToolbars">yes</Setting>
|
||||
<Setting name="NextToCurrent">no</Setting>
|
||||
<Setting name="NewTabDirectory">::{20D04FE0-3AEA-1069-A2D8-08002B30309D}</Setting>
|
||||
<Setting name="OneClickActivate">no</Setting>
|
||||
<Setting name="OneClickActivateHoverTime">500</Setting>
|
||||
<Setting name="OverwriteExistingFilesConfirmation">yes</Setting>
|
||||
<Setting name="PlayNavigationSound">yes</Setting>
|
||||
<Setting name="ReplaceExplorerMode">1</Setting>
|
||||
<Setting name="ShowAddressBar">yes</Setting>
|
||||
<Setting name="ShowApplicationToolbar">no</Setting>
|
||||
<Setting name="ShowBookmarksToolbar">no</Setting>
|
||||
<Setting name="ShowDrivesToolbar">no</Setting>
|
||||
<Setting name="ShowDisplayWindow">yes</Setting>
|
||||
<Setting name="ShowExtensions">yes</Setting>
|
||||
<Setting name="ShowFilePreviews">yes</Setting>
|
||||
<Setting name="ShowFolders">yes</Setting>
|
||||
<Setting name="ShowFolderSizes">no</Setting>
|
||||
<Setting name="ShowFriendlyDates">yes</Setting>
|
||||
<Setting name="ShowFullTitlePath">no</Setting>
|
||||
<Setting name="ShowGridlinesGlobal">yes</Setting>
|
||||
<Setting name="ShowHiddenGlobal">yes</Setting>
|
||||
<Setting name="ShowInfoTips">yes</Setting>
|
||||
<Setting name="ShowInGroupsGlobal">no</Setting>
|
||||
<Setting name="ShowPrivilegeLevelInTitleBar">yes</Setting>
|
||||
<Setting name="ShowStatusBar">yes</Setting>
|
||||
<Setting name="ShowTabBarAtBottom">no</Setting>
|
||||
<Setting name="ShowTaskbarThumbnails">yes</Setting>
|
||||
<Setting name="ShowToolbar">yes</Setting>
|
||||
<Setting name="ShowUserNameTitleBar">yes</Setting>
|
||||
<Setting name="SizeDisplayFormat">1</Setting>
|
||||
<Setting name="SortAscendingGlobal">yes</Setting>
|
||||
<Setting name="StartupMode">1</Setting>
|
||||
<Setting name="SynchronizeTreeview">yes</Setting>
|
||||
<Setting name="TVAutoExpandSelected">no</Setting>
|
||||
<Setting name="UseFullRowSelect">no</Setting>
|
||||
<Setting name="ToolbarState" Button0="Back" Button1="Forward" Button2="Up" Button3="Separator" Button4="Folders" Button5="Separator" Button6="Cut" Button7="Copy" Button8="Paste" Button9="Delete" Button10="Delete permanently" Button11="Properties" Button12="Search" Button13="Separator" Button14="New Folder" Button15="Copy To" Button16="Move To" Button17="Separator" Button18="Views" Button19="Show Command Prompt" Button20="Refresh" Button21="Separator" Button22="Bookmark the current tab" Button23="Organize Bookmarks"/>
|
||||
<Setting name="TreeViewDelayEnabled">no</Setting>
|
||||
<Setting name="TreeViewWidth">208</Setting>
|
||||
<Setting name="ViewModeGlobal">4</Setting>
|
||||
</Settings>
|
||||
<WindowPosition>
|
||||
<Setting name="Position" Flags="2" ShowCmd="3" MinPositionX="0" MinPositionY="0" MaxPositionX="-1" MaxPositionY="-1" NormalPositionLeft="32" NormalPositionTop="45" NormalPositionRight="1568" NormalPositionBottom="783"/>
|
||||
</WindowPosition>
|
||||
<Tabs>
|
||||
<Tab name="0" Directory="C:\" ApplyFilter="no" AutoArrange="yes" Filter="" FilterCaseSensitive="no" ShowGridlines="yes" ShowHidden="yes" ShowInGroups="no" SortAscending="yes" SortMode="1" ViewMode="4" Locked="no" AddressLocked="no" UseCustomName="no" CustomName="">
|
||||
<Columns>
|
||||
<Column name="Generic" Name="yes" Name_Width="150" Type="yes" Type_Width="150" Size="yes" Size_Width="150" DateModified="yes" DateModified_Width="150" Attributes="no" Attributes_Width="150" SizeOnDisk="no" SizeOnDisk_Width="150" ShortName="no" ShortName_Width="150" Owner="no" Owner_Width="150" ProductName="no" ProductName_Width="150" Company="no" Company_Width="150" Description="no" Description_Width="150" FileVersion="no" FileVersion_Width="150" ProductVersion="no" ProductVersion_Width="150" ShortcutTo="no" ShortcutTo_Width="150" HardLinks="no" HardLinks_Width="150" Extension="no" Extension_Width="150" Created="no" Created_Width="150" Accessed="no" Accessed_Width="150" Title="no" Title_Width="150" Subject="no" Subject_Width="150" Author="no" Author_Width="150" Keywords="no" Keywords_Width="150" Comment="no" Comment_Width="150" CameraModel="no" CameraModel_Width="150" DateTaken="no" DateTaken_Width="150" Width="no" Width_Width="150" Height="no" Height_Width="150"/>
|
||||
<Column name="MyComputer" Name="yes" Name_Width="150" TotalSize="yes" TotalSize_Width="150" FreeSpace="no" FreeSpace_Width="150" FileSystem="no" FileSystem_Width="150"/>
|
||||
<Column name="ControlPanel" Name="yes" Name_Width="150"/>
|
||||
<Column name="RecycleBin" Name="yes" Name_Width="150" OriginalLocation="yes" OriginalLocation_Width="150" DateDeleted="yes" DateDeleted_Width="150" Size="yes" Size_Width="150" Type="yes" Type_Width="150" DateModified="yes" DateModified_Width="150"/>
|
||||
<Column name="Printers" Name="yes" Name_Width="150" Documents="yes" Documents_Width="150" Status="yes" Status_Width="150"/>
|
||||
<Column name="Network" Name="yes" Name_Width="150" Owner="yes" Owner_Width="150"/>
|
||||
<Column name="NetworkPlaces" Name="yes" Name_Width="150"/>
|
||||
</Columns>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
<DefaultColumns>
|
||||
<Column name="Generic" Name="yes" Name_Width="150" Type="yes" Type_Width="150" Size="yes" Size_Width="150" DateModified="yes" DateModified_Width="150" Attributes="no" Attributes_Width="150" SizeOnDisk="no" SizeOnDisk_Width="150" ShortName="no" ShortName_Width="150" Owner="no" Owner_Width="150" ProductName="no" ProductName_Width="150" Company="no" Company_Width="150" Description="no" Description_Width="150" FileVersion="no" FileVersion_Width="150" ProductVersion="no" ProductVersion_Width="150" ShortcutTo="no" ShortcutTo_Width="150" HardLinks="no" HardLinks_Width="150" Extension="no" Extension_Width="150" Created="no" Created_Width="150" Accessed="no" Accessed_Width="150" Title="no" Title_Width="150" Subject="no" Subject_Width="150" Author="no" Author_Width="150" Keywords="no" Keywords_Width="150" Comment="no" Comment_Width="150" CameraModel="no" CameraModel_Width="150" DateTaken="no" DateTaken_Width="150" Width="no" Width_Width="150" Height="no" Height_Width="150"/>
|
||||
<Column name="MyComputer" Name="yes" Name_Width="150" TotalSize="yes" TotalSize_Width="150" FreeSpace="no" FreeSpace_Width="150" FileSystem="no" FileSystem_Width="150"/>
|
||||
<Column name="ControlPanel" Name="yes" Name_Width="150"/>
|
||||
<Column name="RecycleBin" Name="yes" Name_Width="150" OriginalLocation="yes" OriginalLocation_Width="150" DateDeleted="yes" DateDeleted_Width="150" Size="yes" Size_Width="150" Type="yes" Type_Width="150" DateModified="yes" DateModified_Width="150"/>
|
||||
<Column name="Printers" Name="yes" Name_Width="150" Documents="yes" Documents_Width="150" Status="yes" Status_Width="150"/>
|
||||
<Column name="Network" Name="yes" Name_Width="150" Owner="yes" Owner_Width="150"/>
|
||||
<Column name="NetworkPlaces" Name="yes" Name_Width="150"/>
|
||||
</DefaultColumns>
|
||||
<Bookmarks>
|
||||
</Bookmarks>
|
||||
<ApplicationToolbar>
|
||||
</ApplicationToolbar>
|
||||
<Toolbars>
|
||||
<Toolbar name="0" id="0" Style="769" Length="604"/>
|
||||
<Toolbar name="1" id="1" Style="257" Length="0"/>
|
||||
<Toolbar name="2" id="2" Style="777" Length="0"/>
|
||||
<Toolbar name="3" id="3" Style="777" Length="618"/>
|
||||
<Toolbar name="4" id="4" Style="777" Length="0"/>
|
||||
</Toolbars>
|
||||
<ColorRules>
|
||||
<ColorRule name="Compressed files" FilenamePattern="" Attributes="2048" r="0" g="0" b="255"/>
|
||||
<ColorRule name="Encrypted files" FilenamePattern="" Attributes="16384" r="0" g="128" b="0"/>
|
||||
</ColorRules>
|
||||
<State>
|
||||
</State>
|
||||
</ExplorerPlusPlus>
|
||||
|
|
@ -4,4 +4,5 @@ USE_ACPI=1
|
|||
USE_SMBUS=1
|
||||
USE_SMART=1
|
||||
USE_DISPLAY=1
|
||||
CPU_0_TJMAX=100.0
|
||||
UPDATES=0
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ for %%f in (%*) do (
|
|||
|
||||
:CreateISO
|
||||
del winpe10-test.iso
|
||||
makewinpemedia.cmd /iso wd winpe10-test.iso
|
||||
makewinpemedia.cmd /iso pe_files winpe10-test.iso
|
||||
|
||||
:Abort
|
||||
echo.
|
||||
|
|
|
|||
57
make.cmd
57
make.cmd
|
|
@ -5,6 +5,7 @@ setlocal EnableDelayedExpansion
|
|||
title WinPE 10 creation tool
|
||||
color 1b
|
||||
pushd %~dp0
|
||||
set "wd=%cd%"
|
||||
set "winpe_ocs=%programfiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"
|
||||
|
||||
|
||||
|
|
@ -14,58 +15,62 @@ for %%f in (%*) do (
|
|||
)
|
||||
|
||||
:CopyPEFiles
|
||||
call copype.cmd amd64 "%cd%\wd"
|
||||
call copype.cmd amd64 "%wd%\pe_files"
|
||||
|
||||
:Mount
|
||||
rem echo Press any key to configure the WinPE image...
|
||||
rem pause>nul
|
||||
mkdir "%cd%\mount"
|
||||
dism /mount-image /imagefile:"%cd%\wd\media\sources\boot.wim" /index:1 /mountdir:"%cd%\mount"
|
||||
mkdir "%wd%\mount"
|
||||
dism /mount-image /imagefile:"%wd%\pe_files\media\sources\boot.wim" /index:1 /mountdir:"%wd%\mount"
|
||||
|
||||
:AddPackages
|
||||
mkdir "%wd%\log"
|
||||
|
||||
:: More info: https://msdn.microsoft.com/en-us/library/windows/hardware/dn938382(v=vs.85).aspx
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-FMAPI.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-WMI.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-WMI_en-us.cab"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-FMAPI.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-WMI.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-WMI_en-us.cab" /logpath:"dism.log"
|
||||
|
||||
:: Install WinPE-WMI before you install WinPE-NetFX.
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-NetFx.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-NetFx_en-us.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-Scripting.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-Scripting_en-us.cab"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-NetFx.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-NetFx_en-us.cab" /logpath:"dism.log"
|
||||
|
||||
:: Install WinPE-WMI > WinPE-NetFX before you install WinPE-Scripting.
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-Scripting.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-Scripting_en-us.cab" /logpath:"dism.log"
|
||||
|
||||
:: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting before you install WinPE-PowerShell.
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-PowerShell.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-PowerShell_en-us.cab"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-PowerShell.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-PowerShell_en-us.cab" /logpath:"dism.log"
|
||||
|
||||
:: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-DismCmdlets.
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-DismCmdlets.cab"
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-DismCmdlets_en-us.cab"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-DismCmdlets.cab" /logpath:"dism.log"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-DismCmdlets_en-us.cab" /logpath:"dism.log"
|
||||
|
||||
:: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-SecureBootCmdlets.
|
||||
dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-SecureBootCmdlets.cab"
|
||||
dism /add-package /image:"%wd%\mount" /packagepath:"%winpe_ocs%\WinPE-SecureBootCmdlets.cab" /logpath:"dism.log"
|
||||
|
||||
:Robocopy
|
||||
del "%cd%\WK\Scripts\WK.log"
|
||||
mkdir "%cd%\mount\WK"
|
||||
robocopy /e "%cd%\WK" "%cd%\mount\WK"
|
||||
del "%wd%\WK\Scripts\WK.log"
|
||||
mkdir "%wd%\mount\WK"
|
||||
robocopy /e "%wd%\WK" "%wd%\mount\WK"
|
||||
mklink "%wd%\mount\System32\explorer.exe" "%wd%\mount\WK\Explorer++.exe"
|
||||
|
||||
:MenuLauncher
|
||||
copy /y "%cd%\System32\menu.cmd" "%cd%\mount\Windows\System32\menu.cmd"
|
||||
copy /y "%wd%\System32\menu.cmd" "%wd%\mount\Windows\System32\menu.cmd"
|
||||
|
||||
:ReplaceStartnet
|
||||
copy /y "%cd%\System32\startnet.cmd" "%cd%\mount\Windows\System32\startnet.cmd"
|
||||
copy /y "%wd%\System32\startnet.cmd" "%wd%\mount\Windows\System32\startnet.cmd"
|
||||
|
||||
:ReplaceNotepad
|
||||
reg load HKLM\WinPE-SW mount\Windows\System32\config\SOFTWARE
|
||||
reg add "HKLM\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v Debugger /t REG_SZ /d "X:\WK\Notepad2.exe /z" /f
|
||||
reg add "HKLM\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe" /v Debugger /t REG_SZ /d "X:\WK\Explorer++.exe /z" /f
|
||||
reg unload HKLM\WinPE-SW
|
||||
|
||||
:Background
|
||||
takeown /f "%cd%\mount\Windows\System32\winpe.jpg" /a
|
||||
icacls "%cd%\mount\Windows\System32\winpe.jpg" /grant administrators:F
|
||||
copy /y "%cd%\System32\winpe.jpg" "%cd%\mount\Windows\System32\winpe.jpg"
|
||||
takeown /f "%wd%\mount\Windows\System32\winpe.jpg" /a
|
||||
icacls "%wd%\mount\Windows\System32\winpe.jpg" /grant administrators:F
|
||||
copy /y "%wd%\System32\winpe.jpg" "%wd%\mount\Windows\System32\winpe.jpg"
|
||||
|
||||
:ManualStuff
|
||||
echo Now is the time to add stuff (optional).
|
||||
|
|
@ -74,11 +79,11 @@ echo Press any key to commit changes...
|
|||
pause>nul
|
||||
|
||||
:Unmount
|
||||
dism /unmount-image /mountdir:"%cd%\mount" /commit
|
||||
dism /unmount-image /mountdir:"%wd%\mount" /commit
|
||||
|
||||
:CreateISO
|
||||
del winpe10-test.iso
|
||||
makewinpemedia.cmd /iso wd winpe10-test.iso
|
||||
makewinpemedia.cmd /iso "%wd%\pe_files" winpe10-test.iso
|
||||
goto Done
|
||||
|
||||
:Abort
|
||||
|
|
|
|||
100
update.cmd
100
update.cmd
|
|
@ -1,100 +0,0 @@
|
|||
@echo off
|
||||
|
||||
:Init
|
||||
setlocal EnableDelayedExpansion
|
||||
title WinPE 10 update tool
|
||||
color 1b
|
||||
pushd %~dp0
|
||||
set "winpe_ocs=%programfiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"
|
||||
|
||||
|
||||
:Flags
|
||||
for %%f in (%*) do (
|
||||
if /i "%%f" == "/DEBUG" (@echo on)
|
||||
)
|
||||
|
||||
:CopyPEFiles
|
||||
rem call copype.cmd amd64 "%cd%\wd"
|
||||
|
||||
:Mount
|
||||
rem echo Press any key to configure the WinPE image...
|
||||
rem pause>nul
|
||||
mkdir "%cd%\mount"
|
||||
dism /mount-image /imagefile:"%cd%\wd\media\sources\boot.wim" /index:1 /mountdir:"%cd%\mount"
|
||||
|
||||
:AddPackages
|
||||
rem :: More info: https://msdn.microsoft.com/en-us/library/windows/hardware/dn938382(v=vs.85).aspx
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-FMAPI.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-WMI.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-WMI_en-us.cab"
|
||||
|
||||
rem :: Install WinPE-WMI before you install WinPE-NetFX.
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-NetFx.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-NetFx_en-us.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-Scripting.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-Scripting_en-us.cab"
|
||||
|
||||
rem :: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting before you install WinPE-PowerShell.
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-PowerShell.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-PowerShell_en-us.cab"
|
||||
|
||||
rem :: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-DismCmdlets.
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-DismCmdlets.cab"
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\en-us\WinPE-DismCmdlets_en-us.cab"
|
||||
|
||||
rem :: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell before you install WinPE-SecureBootCmdlets.
|
||||
rem dism /add-package /image:"%cd%\mount" /packagepath:"%winpe_ocs%\WinPE-SecureBootCmdlets.cab"
|
||||
|
||||
:Robocopy
|
||||
del "%cd%\WK\Scripts\WK.log"
|
||||
rem mkdir "%cd%\mount\WK"
|
||||
robocopy /e "%cd%\WK" "%cd%\mount\WK"
|
||||
|
||||
:MenuLauncher
|
||||
copy /y "%cd%\System32\menu.cmd" "%cd%\mount\Windows\System32\menu.cmd"
|
||||
|
||||
:ReplaceStartnet
|
||||
copy /y "%cd%\System32\startnet.cmd" "%cd%\mount\Windows\System32\startnet.cmd"
|
||||
|
||||
:ReplaceNotepad
|
||||
reg load HKLM\WinPE-SW mount\Windows\System32\config\SOFTWARE
|
||||
reg add "HKLM\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v Debugger /t REG_SZ /d "X:\WK\Notepad2.exe /z" /f
|
||||
reg add "HKLM\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe" /v Debugger /t REG_SZ /d "X:\WK\Explorer++.exe /z" /f
|
||||
reg unload HKLM\WinPE-SW
|
||||
|
||||
:Background
|
||||
takeown /f "%cd%\mount\Windows\System32\winpe.jpg" /a
|
||||
icacls "%cd%\mount\Windows\System32\winpe.jpg" /grant administrators:F
|
||||
copy /y "%cd%\System32\winpe.jpg" "%cd%\mount\Windows\System32\winpe.jpg"
|
||||
|
||||
:ManualStuff
|
||||
echo Now is the time to add stuff (optional).
|
||||
echo.
|
||||
echo Press any key to commit changes...
|
||||
pause>nul
|
||||
|
||||
:Unmount
|
||||
dism /unmount-image /mountdir:"%cd%\mount" /commit
|
||||
|
||||
:CreateISO
|
||||
del winpe10-test.iso
|
||||
makewinpemedia.cmd /iso wd winpe10-test.iso
|
||||
goto Done
|
||||
|
||||
:Abort
|
||||
echo.
|
||||
echo Aborted.
|
||||
goto Exit
|
||||
|
||||
:Done
|
||||
echo.
|
||||
echo Done.
|
||||
goto Exit
|
||||
|
||||
:Exit
|
||||
echo.
|
||||
echo Press any key to exit...
|
||||
pause>nul
|
||||
popd
|
||||
color
|
||||
endlocal
|
||||
Loading…
Reference in a new issue