fix(1c): harden company telemetry rollout

This commit is contained in:
igor04091968
2026-05-22 11:01:33 +03:00
parent 243edccdd3
commit 5c4966f1ff
6 changed files with 59 additions and 5 deletions
+4 -1
View File
@@ -57,7 +57,10 @@ function Get-1CFileInfobases {
Where-Object { Test-Path -LiteralPath $_ }
foreach ($file in $launcherFiles) {
$userName = Split-Path -Leaf (Split-Path -Parent (Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $file))))
$userName = 'unknown'
if ([string]$file -match '^[A-Za-z]:\\Users\\([^\\]+)\\') {
$userName = [string]$Matches[1]
}
$currentName = $null
$currentId = $null
foreach ($lineRaw in Get-Content -LiteralPath $file -Encoding UTF8) {