Portable Windows gadgets usually end after solving a problem. However, this does two things at the same time: get Office installers directly from the Microsoft content delivery network and read what activation status the Microsoft product originally installed on the computer is in. This project appeared in Reddit - r/coolgithubprojects and only has a single executable. There is no installer, no background services, and no registry needs other than what Windows initially writes.
What the tool actually wraps
There is no magic here. Microsoft properly bundles all components that the app touches. The app itself is almost a frontend and its job is to spit out configuration files and pipe them to signed binaries.
Leave the download page to the Office Deployment Tool. It's a tiny setup.exe that reads the XML file, figures out what product, channel, and architecture you want, and then gets the payload from officecdn.microsoft.com. The click-to-run stack takes care of the rest: the virtualized app container, the ClickToRunSvc service and the version manifest hidden under HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration. Since the container is virtualized, the two Office builds can run freely on the hard drive. In System32 you don't have to fight about DLLs.
The activation side is thinner. Windows runs the Software Protection Platform service (sppsvc), which owns all license tokens on the computer. Office shows itself via ospp.vbs - this script communicates with the Office Software Protection Platform and reports the grace period, partial product key and host address KMS. The portable app reads both and displays the results in a single panel.
Why a portable binary beats the official installer
The official method asks you to first download the ODT, unzip it, and handwrite the XML file. Also remember which of the four channels your tenant is committed to. For a job that only needs to be done twice a year, it goes through four work phases. If you have a portable wrapper, it will be compressed into a dropdown menu and a button. If you delete the folder, nothing will be left. For engineers working on client machines, this is much more effective than any feature list.
Step 1: Pull the Office payload with an explicit configuration
Whether you use the GUI or not, make sure you understand the generated XML. Save this as office-p4t.xml next to setup.exe:
<Configuration ID="p4t-office">
<Add OfficeClientEdition="64" Channel="Current" SourcePath="D:\OfficeCache">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="Lync" />
</Product>
</Add>
<RemoveMSI />
<Display Level="None" AcceptEULA="TRUE" />
</Configuration>
- Open an elevated PowerShell session in the ODT folder.
- Run
.\setup.exe /download .\office-p4t.xmlto cache the payload locally. - Run
.\setup.exe /configure .\office-p4t.xmlto install from that cache. - Point
SourcePathat a USB drive or network share to reuse the same cache across machines.
The RemoveMSI element is often forgotten. If this is missing, the old MSI-based Office 2013 installation remains on the disk and there are two product entries under Programs and Features.
Step 2: Verify what actually landed
Don't trust the home screen, trust the registry. This guy reads the click-to-run manifest directly:
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' |
Select-Object ProductReleaseIds, VersionToReport, Platform, CDNBaseUrl
Get-Service ClickToRunSvc, sppsvc | Select-Object Name, Status, StartType
CDNBaseUrl tells us which channel this build is pinned to. There is a mismatch between this value and the channel you want to use. This is the reason for most complaints that "Office updated itself overnight".
Step 3: Read activation state without guessing
The Office license information is contained in a separate script that is not the same as the one for Windows. Do both - the two are more at odds than you might think.
cscript //nologo "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /dstatus
slmgr.vbs /dlv
The first command prints the last 5 characters of the installed product key, the license type (retail, volume, subscription), and the remaining grace period. The second command targets Windows itself. There are a limited number of legitimate activation paths: use a retail key, use a volume license key that passes validation on your organization's KMS host, or sign in with the Microsoft 365 login and have Azure AD issue a license. Anything that claims to be able to fly these routes is simply rewriting the sppsvc status. Doing this on a work machine would be a decision that could affect your employment.
Manual ODT versus the portable wrapper
| Task | Manual ODT workflow | Portable wrapper |
|---|---|---|
| Initial setup | Download ODT, extract, author XML by hand | Launch one executable, pick options |
| Admin rights | Required for install, not for download | Required for install, not for download |
| Disk footprint | ODT files plus cache | Single binary plus cache |
| Channel control | Explicit in XML, fully auditable | Dropdown, XML generated at runtime |
| Activation visibility | Manual ospp.vbs calls | Parsed and displayed in one panel |
| Update path | Re-run /download with new XML | Same, triggered from the UI |
| Audit trail | XML file you can commit to git | None unless you export it |
| Trust surface | Microsoft-signed binaries only | Third-party binary plus Microsoft binaries |
Where the risk actually sits
High-utility tip: Before running any portable activation utility, hash the binary and check the release page signature. Run Get-FileHash .\tool.exe -Algorithm SHA256 and compare against the maintainer's published digest. Then check the GitHub commit history for the release tag, not just the README. A wrapper that shells out to slmgr needs no network access at all, so any outbound connection to an unfamiliar domain is a red flag worth investigating before you type an admin password.
SmartScreen issues a warning when unsigned single-file executable files are found. This warning is by no means a joke. Repackaged builds of popular activation scripts with additional payloads are circulating on file sharing sites. If you want to get it, go to the repository's release page and first check the hash. Do not place this tool on machines subject to compliance audits unless you can document your license status.
It actually has some legitimate uses. And it's clear. Armed with a stack of laptops and a USB stick, a technician checks each machine to make sure the license is still valid before returning it to the user. It's worth automating this type of work. The rest is about licenses, not technology.
The entire thread and discussion can be found here: Reddit - r/coolgithubprojects.
Comments
Post a Comment