You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
944 B
31 lines
944 B
$currentDir = $MyInvocation.MyCommand.Definition | Split-Path -Parent
|
|
$outFile = "{0}\RuTextGenerator.txt"-f $currentDir
|
|
|
|
if (Test-Path -Path $outFile) {
|
|
Remove-Item -Path $outFile -Force -Confirm:$false
|
|
Write-Warning -Message "File ""RuTextGenerator.txt"" deleted!"
|
|
}
|
|
|
|
"Privacy", "UI", "OneDrive", "System", "StartMenu", "Edge",
|
|
"UWPApps", "WindowsGameRecording", "ScheduledTasks", "MicrosoftDefender", "ContextMenu" | ForEach-Object {
|
|
|
|
$categoryName = $_
|
|
$categoryFile = "{0}\Ru\Settings-{1}.txt"-f $currentDir, $categoryName
|
|
|
|
if (Test-Path -Path $categoryFile) {
|
|
@"
|
|
######################### $categoryName #########################
|
|
"@ | Out-File -FilePath $outFile -Append
|
|
|
|
$text = Get-Content -Path $categoryFile
|
|
|
|
for ($i = 0; $i -lt $text.Count; $i++) {
|
|
"""{0}"", "-f $text[$i] | Out-File -FilePath $outFile -Append
|
|
}
|
|
}
|
|
|
|
else {
|
|
Write-Warning -Message "File ""$categoryFile"" not found!"
|
|
}
|
|
|
|
}
|