Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
windows-vm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pem
windows-vm
Commits
12a676a5
Commit
12a676a5
authored
Apr 09, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added script for windows seettings
parent
084957fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
5 deletions
+36
-5
Vagrantfile
Vagrantfile
+2
-5
WindowsSettings.ps1
src/scripts/ps/WindowsSettings.ps1
+34
-0
No files found.
Vagrantfile
View file @
12a676a5
...
...
@@ -38,10 +38,7 @@ Vagrant.configure("2") do |config|
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/ps/ChocolateyInstallPackages.ps1"
## Wireguard Install and setup
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/ps/WireguardInstall.ps1"
## Change timezone
config
.
vm
.
provision
"shell"
,
inline:
<<-
SHELL
Write-Output "=== Change timezone ==="
tzutil /s "SA Pacific Standard Time"
SHELL
## Windows settings
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/ps/WireguardInstall.ps1"
end
src/scripts/ps/WindowsSettings.ps1
0 → 100644
View file @
12a676a5
# Change timezone
tzutil /s
"SA Pacific Standard Time"
# Add shortcuts
## Get the desktop path for the current user
$desktopPath
=
[
Environment]::GetFolderPath
(
"Desktop"
)
## PowerShell
### Create the shortcut path
$shortcutPath
=
Join-Path
$desktopPath
"PowerShell.lnk"
### Create the WScript.Shell COM object
$WshShell
=
New-Object
-ComObject WScript.Shell
### Create the shortcut
$shortcut
=
$WshShell
.CreateShortcut
(
$shortcutPath
)
### Set the target path to PowerShell
$shortcut
.TargetPath
=
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
### Save the shortcut
$shortcut
.Save
()
# Change wallpaper
## Remove any set wallpaper
Set-ItemProperty
-Path
"HKCU:\Control Panel\Desktop"
-Name
"Wallpaper"
-Value
""
## Force a solid color (e.g., black)
Set-ItemProperty
-Path
"HKCU:\Control Panel\Colors"
-Name
"Background"
-Value
"0 0 0"
## Refresh the desktop to apply wallpaper removal
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters ,1 ,True
# Set dark mode for system and apps
Set-ItemProperty
-Path
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
-Name
"AppsUseLightTheme"
-Value 0
Set-ItemProperty
-Path
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
-Name
"SystemUsesLightTheme"
-Value 0
# Restart explorer.exe
Stop-Process
-Name explorer -Force
Start-Process
explorer.exe
\ No newline at end of file
Write
Preview
Markdown
is supported
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