mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-05 07:20:09 +00:00
Test 2023 07 27 (#934)
* Updated Edge Removal Script to the more up-to-date one. (#918) * Update edgeremoval.bat from the original source. * Added my modifications to the extra cleanup part * Updates credits for Edge Removal script * Removed "getfirefox" * Credit to the original source * Compile Winutil * fix typos (#924) * Compile Winutil * Remove ooshutup10 "Disable search box in task bar" (#929) * Compile Winutil * Fix Panel Glitch and add intl * Compile Winutil * Fix Bluetooth services * Compile Winutil * fix function --------- Co-authored-by: Antun Nitraj <antnitraj@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: AdamJedl <100023363+AdamJedl@users.noreply.github.com>
This commit is contained in:
18
functions/private/Update-EnvironmentVariables.ps1
Normal file
18
functions/private/Update-EnvironmentVariables.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
<#
|
||||
|
||||
.DESCRIPTION
|
||||
Updates Path Variables for the current session
|
||||
|
||||
#>
|
||||
|
||||
function Update-EnvironmentVariables {
|
||||
foreach($level in "Machine","User") {
|
||||
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
|
||||
# For Path variables, append the new values, if they're not already in there
|
||||
if($_.Name -match 'Path$') {
|
||||
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -split ';' | Select-Object -unique) -join ';'
|
||||
}
|
||||
$_
|
||||
} | Set-Content -Path { "Env:$($_.Name)" }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user