Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Bob Tanner
packer-windows
Commits
6a6c8e0f
Commit
6a6c8e0f
authored
Jan 13, 2017
by
Stefan Scherer
Browse files
Skip steps in Hyper-V build
parent
37bb40ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/compact.bat
View file @
6a6c8e0f
if
"
%PACKER
_BUILDER_TYPE:~0,6
%
"
==
"hyperv"
(
echo
"Skip compact steps in Hyper-V build."
goto
:eof
)
if
not
exist
"C:\Windows\Temp\7z920-x64.msi"
(
powershell
-Command
"(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')"
<
NUL
)
...
...
scripts/debloat-windows.ps1
View file @
6a6c8e0f
Write-Host
Downloading
debloat
zip
$url
=
"https://github.com/StefanScherer/Debloat-Windows-10/archive/master.zip"
(
New-Object
System.Net.WebClient
)
.
DownloadFile
(
$url
,
"
$
env
:
TEMP
\debloat.zip"
)
Expand-Archive
-Path
$
env
:
TEMP
\debloat.zip
-DestinationPath
$
env
:
TEMP
-Force
if
(
$
env
:
PACKER_BUILDER_TYPE
-And
$
(
$
env
:
PACKER_BUILDER_TYPE
)
.
startsWith
(
"hyperv"
))
{
Write-Host
Skip
debloat
steps
in
Hyper-V
build.
}
else
{
Write-Host
Downloading
debloat
zip
$url
=
"https://github.com/StefanScherer/Debloat-Windows-10/archive/master.zip"
(
New-Object
System.Net.WebClient
)
.
DownloadFile
(
$url
,
"
$
env
:
TEMP
\debloat.zip"
)
Expand-Archive
-Path
$
env
:
TEMP
\debloat.zip
-DestinationPath
$
env
:
TEMP
-Force
#Write-Host Disable scheduled tasks
#. $env:TEMP\Debloat-Windows-10-master\utils\disable-scheduled-tasks.ps1
#Write-Host Block telemetry
#. $env:TEMP\Debloat-Windows-10-master\scripts\block-telemetry.ps1
#Write-Host Disable services
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-services.ps1
Write-host
Disable
Windows
Defender
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1
Uninstall-WindowsFeature
Windows-Defender-Features
Write-host
Optimize
Windows
Update
.
$
env
:
TEMP
\Debloat-Windows-10-master\scripts\optimize-windows-update.ps1
#Write-host Disable Windows Update
#Set-Service wuauserv -StartupType Disabled
#Write-Host Remove OneDrive
#. $env:TEMP\Debloat-Windows-10-master\scripts\remove-onedrive.ps1
#Write-Host Disable scheduled tasks
#. $env:TEMP\Debloat-Windows-10-master\utils\disable-scheduled-tasks.ps1
#Write-Host Block telemetry
#. $env:TEMP\Debloat-Windows-10-master\scripts\block-telemetry.ps1
#Write-Host Disable services
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-services.ps1
Write-host
Disable
Windows
Defender
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1
Uninstall-WindowsFeature
Windows-Defender-Features
Write-host
Optimize
Windows
Update
.
$
env
:
TEMP
\Debloat-Windows-10-master\scripts\optimize-windows-update.ps1
#Write-host Disable Windows Update
#Set-Service wuauserv -StartupType Disabled
#Write-Host Remove OneDrive
#. $env:TEMP\Debloat-Windows-10-master\scripts\remove-onedrive.ps1
rm
$
env
:
TEMP
\debloat.zip
rm
-recurse
$
env
:
TEMP
\Debloat-Windows-10-master
rm
$
env
:
TEMP
\debloat.zip
rm
-recurse
$
env
:
TEMP
\Debloat-Windows-10-master
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment