-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_files.ps1
More file actions
20 lines (18 loc) · 965 Bytes
/
Copy pathedit_files.ps1
File metadata and controls
20 lines (18 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Pull settings from INI file and define them as variables
$INI = Get-Content -Path 'settings.ini' | Select-Object -Skip 1
$directory = ($INI | Where-Object { $_.Trim() -match '^directory=' }) -replace '^directory=', ''
$temp_list = ($INI | Where-Object { $_.Trim() -match '^temp_list=' }) -replace '^temp_list=|$', ''
# Define your custom text
$customText = @"
########################################################
##### ADOBE TELEMETRY BLOCK ######
########################################################
# These IPs will only block the telemetry check of Adobe
# apps, and shouldn't interfere with any other network
# option, such as AI generation, downloads, etc.
"@
# Process the temp file
$filePath = Join-Path -Path $directory -ChildPath $temp_list
$fileContent = Get-Content $filePath | Select-Object -Skip 6
$newContent = $customText + "`r`n" + ($fileContent -join "`r`n")
[System.IO.File]::WriteAllText($filePath, $newContent)