miroir de
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synchronisé 2024-11-23 01:34:02 +01:00
Fix SID code in KMS script
Cette révision appartient à :
Parent
b5a305a14e
révision
f2e6e6e389
1 fichiers modifiés avec 1 ajouts et 1 suppressions
|
@ -1164,7 +1164,7 @@ exit /b
|
|||
:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state
|
||||
|
||||
set _sidlist=
|
||||
for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty $('{0}\{1}' -f $p, $_.PSChildName)).ProfileImagePath; if ($pi -like $('{0}\Users\*' -f $Env:SystemDrive)) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a))
|
||||
for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like """"$Env:SystemDrive\Users\*"""" -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_ -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a))
|
||||
|
||||
if not defined _sidlist (
|
||||
set error=1
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket