added offline handling for powershell packages
This commit is contained in:
parent
6c18df3201
commit
d87758505b
@ -64,7 +64,6 @@ echo searchdomains=%searchdomains%
|
||||
echo ++++++++++++++++++
|
||||
echo.
|
||||
|
||||
|
||||
echo #######################
|
||||
echo ### UNPACK and COPY ###
|
||||
echo #######################
|
||||
@ -78,6 +77,10 @@ rem windows update blocker is in the zipfiles ...
|
||||
call unpack-zipfiles.cmd
|
||||
echo.
|
||||
|
||||
rem unpack powershell packages and register them ...
|
||||
call unpack-pspackages.cmd
|
||||
echo.
|
||||
|
||||
rem put vnc in place ...
|
||||
call unpack-vnc.cmd
|
||||
echo.
|
||||
@ -175,6 +178,8 @@ echo.
|
||||
call install-shortcuts.cmd
|
||||
echo.
|
||||
|
||||
powershell -Command "Install-Module -Name PSWindowsUpdate"
|
||||
|
||||
rem should be done as late as possible ...
|
||||
call install-logonscript.cmd
|
||||
echo.
|
||||
@ -213,10 +218,6 @@ if %windows_updates% == 1 (
|
||||
echo.
|
||||
)
|
||||
|
||||
rem install a powershell package for updates handling ...
|
||||
call install-psupdate.cmd
|
||||
echo.
|
||||
|
||||
call block-updates.cmd
|
||||
echo.
|
||||
|
||||
|
@ -1,15 +1,17 @@
|
||||
@echo off
|
||||
call check-for-admin
|
||||
if %ERRORLEVEL% neq 0 exit /b
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
echo blocking UPDATE KB5005463 aka. PC-Health ...
|
||||
powershell -command "Hide-WindowsUpdate -KBArticleID KB5005463 -AcceptAll"
|
||||
|
||||
echo blocking UPDATE KB5021751 ...
|
||||
echo [ Notifies Microsoft if an Unsupported Office version is installed on Windows ]
|
||||
powershell -command "Hide-WindowsUpdate -KBArticleID KB5021751 -AcceptAll"
|
||||
|
||||
echo.
|
||||
echo showing HIDDEN windows updates ...
|
||||
powershell -command "Get-WindowsUpdate -IsHidden"
|
||||
|
||||
echo ####### %0 #######
|
||||
pause
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
@echo off
|
||||
call check-for-admin
|
||||
if %ERRORLEVEL% neq 0 exit /b
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
echo Installing package provider NuGet ...
|
||||
powershell -command "Install-PackageProvider NuGet -Force"
|
||||
|
||||
echo Setting policy for PSGallery to trusted ...
|
||||
powershell -command "Set-PSRepository PSGallery -InstallationPolicy Trusted"
|
||||
|
||||
echo Installing powershell package PSWindowsUpdate ...
|
||||
powershell -command "Install-Module PSWindowsUpdate"
|
||||
echo.
|
||||
|
||||
echo ####### %0 #######
|
||||
pause
|
||||
|
37
scripts/unpack-pspackages.cmd
Normal file
37
scripts/unpack-pspackages.cmd
Normal file
@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
|
||||
set TOOLS=c:\tools
|
||||
set SOFTWARE=..\software
|
||||
set TARGET="%ProgramFiles%\WindowsPowerShell\Modules"
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
rem ######################################
|
||||
rem MAIN loop ( unzip nuget packages ) ...
|
||||
rem ######################################
|
||||
|
||||
for %%A in (
|
||||
|
||||
PSWindowsUpdate
|
||||
|
||||
) do (
|
||||
|
||||
if NOT EXIST %SOFTWARE%\%%A.nupkg (
|
||||
echo WARNING: %SOFTWARE%\%%A.nupkg not found!
|
||||
) else (
|
||||
|
||||
rem cleanup ...
|
||||
rd /S /Q %TARGET%\%%A
|
||||
|
||||
echo unpacking %%A.nupkg ...
|
||||
%TOOLS%\7z e -y -aoa -o%TARGET%\%%A %SOFTWARE%\%%A.nupkg 1>nul
|
||||
|
||||
echo importing module [ %%A ] ...
|
||||
powershell -Command "Import-Module -Name %%A"
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo ####### %0 #######
|
||||
|
2
software/.gitignore
vendored
2
software/.gitignore
vendored
@ -9,3 +9,5 @@
|
||||
*.wim
|
||||
*.zip
|
||||
*.msixbundle
|
||||
*.nupkg
|
||||
|
||||
|
@ -38,4 +38,5 @@ https://mark0.net/download/triddefs.zip triddefs.zip
|
||||
https://github.com/microsoft/terminal/releases/download/v1.10.2383.0/Microsoft.WindowsTerminal_1.10.2383.0_8wekyb3d8bbwe.msixbundle windowsterminal-setup.msixbundle
|
||||
https://kolbi.cz/SetDefaultBrowser.zip setdefaultbrowser.zip
|
||||
https://github.com/DavidXanatos/wumgr/releases/download/v1.1/WuMgr_v1.1b.zip wumgr.zip
|
||||
https://psg-prod-eastus.azureedge.net/packages/pswindowsupdate.2.2.0.3.nupkg pswindowsupdate.nupkg
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user