update the code, and the output of my new s**ti `rebuild office license` tool I don't know if it is useful for anyone, but it could be a resource for something useful in the future from every stupid idiotic idea, you can take some knowledge for future projects Spoiler: Image Spoiler: Source Code Code: cls Write-Host $LicenseWMI = $null $InstallPath = $null $LicenseList = $null $ServiceClass = $null $ServiceClass = gwmi SoftwareLicensingService $InstallPath_X64 = Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun" -Name "InstallPath" -ea 0 $InstallPath_X86 = Get-ItemProperty -path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun" -Name "InstallPath" -ea 0 if ($InstallPath_X86 -and (Test-path $InstallPath_X86.InstallPath)) { $InstallPath = $InstallPath_X86.InstallPath } if ($InstallPath_X64 -and (Test-path $InstallPath_X64.InstallPath)) { $InstallPath = $InstallPath_X64.InstallPath } if (-not $InstallPath) { return } # Get licenses $LicenseWMI = GWMI SoftwareLicensingProduct -ErrorAction SilentlyContinue | ? ApplicationId -EQ '0ff1ce15-a989-479d-af46-f275c6370663' | ? LicenseIsAddon -EQ $false if (-not $LicenseWMI) { return } $LicenseList = $LicenseWMI.LicenseFamily.Substring(8) $Client_List = "pkeyconfig-office.xrm-ms,pkeyconfig-office-client15.xrm-ms,client-issuance-root.xrm-ms,client-issuance-stil.xrm-ms,client-issuance-ul.xrm-ms,client-issuance-ul-oob.xrm-ms,client-issuance-root-bridge-test.xrm-ms,client-issuance-bridge-office.xrm-ms" Write-Host "*** licenses Found:" -BackgroundColor DarkRed Write-Host $LicenseList | % {"- $($_)" } Write-Host # Clean licenses try { $compilerParameters = New-Object -TypeName CodeDom.Compiler.CompilerParameters $compilerParameters.CompilerOptions = '/unsafe' Add-Type -CompilerParameters $compilerParameters @" using System; using System.Runtime.InteropServices; public class API { unsafe delegate uint SLOpenDelegate(void** phSLC); unsafe delegate uint SLGetSLIDListDelegate(void* hSLC, int eQueryIdType, Guid* pQueryId, int eReturnIdType, uint* pnReturnIds, Guid** ppReturnIds); unsafe delegate uint SLUninstallLicenseDelegate(void* hSLC, Guid* pLicenseFileId); [DllImport("kernel32.dll")] static extern IntPtr LoadLibrary(string path); [DllImport("kernel32.dll")] static extern IntPtr GetProcAddress(IntPtr hModule, string procName); public static void CleanLicenses() { UninstallLicenses("sppc"); string ospp = (string)Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\OfficeSoftwareProtectionPlatform", "Path", null); if (ospp != null) { Console.WriteLine("Found Office Software Protection installed, cleaning"); UninstallLicenses(ospp + "osppc.dll"); } } public static void UninstallLicenses(string dllPath) { IntPtr sppc = LoadLibrary(dllPath); SLOpenDelegate open = (SLOpenDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(sppc, "SLOpen"), typeof(SLOpenDelegate)); SLGetSLIDListDelegate getSLIDList = (SLGetSLIDListDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(sppc, "SLGetSLIDList"), typeof(SLGetSLIDListDelegate)); SLUninstallLicenseDelegate uninstallLicense = (SLUninstallLicenseDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(sppc, "SLUninstallLicense"), typeof(SLUninstallLicenseDelegate)); unsafe { void* phSLC; open(&phSLC); uint pnReturnIds; Guid* ppReturnIds; Guid officeGuid = new Guid("0ff1ce15-a989-479d-af46-f275c6370663"); if (getSLIDList(phSLC, 0, &officeGuid, 6, &pnReturnIds, &ppReturnIds) != 0) { return; } for (int i = 0; i < pnReturnIds; i++) { Console.WriteLine(ppReturnIds[i]); uninstallLicense(phSLC, &ppReturnIds[i]); } } } } "@ } catch { return } Write-Host "*** Un-install GUID:" -BackgroundColor DarkRed Write-Host [API]::CleanLicenses() Write-Host Write-Host "Re-Install Licenses:" -BackgroundColor DarkRed Write-Host # Restore licenses $Client_List.Split(",") | % { $LicenseFile = Join-Path $InstallPath "root\Licenses16\$($_)" if (Test-Path $LicenseFile) { "- $($_)" $ServiceClass.InstallLicense( @([IO.File]::ReadAllText($LicenseFile))) | Out-Null }} Write-Host $LicenseList | % { $LicenseName = "$($_)".Replace(" ","") $LicenseFile = Join-Path $InstallPath "root\Licenses16\$($LicenseName)" "- $($LicenseName)$($pat).xrm-ms" foreach ($pat in "-ppd,-ul,-ul-oob".Split(',')) { if (Test-Path "$($LicenseFile)$($pat).xrm-ms") { $ServiceClass.InstallLicense( @([IO.File]::ReadAllText("$($LicenseFile)$($pat).xrm-ms"))) | Out-Null }} } return
Or buy a 365 sub-description .. .... .. ... I working on replace clean c2r vbs file from Ms To PowerShell code. An vbs alternative (poor one, but will work) I do wonder if Ms push people to use PS Provide an alternative!? Nope.
He's simply providing us with a useful tool. Be grateful when you try to request some feature or ask a question. In the end, you didn't pay anything here so he can decide to just ignore your question.
very well said @oliverjia myself would be more than happy to pay some money esp to developers like msmg, abbodi and to whoever developed OfficeRTool if they could have some bank account people like myself could send some money i would most definitely do. or some of the tools could simply become something like ntlite, $10 for msmg toolkit would be nothing for me and a lot to developer if many contributed. or whoever owns mdl could think of it. Set some bank account people like myself can send some money to and then mdl gives it to developer.
Trying this thanks for your effort @Dark Dinosaur Doing the scrubber first, since there are so many default uninstall options in settings one just miss something , and my bitdefender had to be deactivated... plz dont hack me... BTW office 365 for Familiy with 5 licenses it indeed called that. Office 365 Home Premium, might be similar, but not in the sub plan I had. Maybe it is different for EMEA/US/ROW/ASEAN etc... Markets
ok, everything seems to work, it would be helpful if a screenshot of the script running, like this, would be posted in the initial intro...
for the next version. if `VBS` engine is not found, or `PS` engine is selected if you choose scrub, will use my new PS1 scrub file Clean Components in CLSID, will be disabled - takes too much time, about 20 minutes
I keep getting errors about integrator missing when trying the V option, not that I need it, but still. Testing a bit more on a VM I have... Language selection for Office professional Plus 2024 has issues... tried 4 times could not get the combo right, default en GB > English > English did not work English > English > English did not work to be honest I don't know what to expect here Maybe I am picking the wrong distro channel, it is not very clear in the pdf how to pair these things...
2024 is not supported, it was a test. such a product does not exist. It does support converting & activate Look here. https://forums.mydigitallife.net/threads/87850/ https://forums.mydigitallife.net/threads/87688/
365 have their own products id you can select 365 products to install, select option 2 & 3, option 1 can\can't be consider 365 anymore
Update v10 rev 6 was planned to be released on 1 Jan, but I think it's ready. .. this release is special !! finish all the PS conversations Include /rilc /ato replacement (ps version) including a custom-made office uninstall `PS1` file, based on the original VBS file. (this took me only 3-4 days) In this version ... if `PS` engine is selected ... when press `H` ... will show this instead