Fix Excel Unlicensed Product Error with /Automation Switch
Question details
The user encounters an unlicensed product error exclusively when launching Microsoft Excel via the command line using the /automation switch.

- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Starting Excel via automated scripts or command-line parameters to run background tasks without the standard user interface.
- Observed behavior
- Excel displays an 'unlicensed product' error message and fails to activate properly, even though the software works perfectly fine when launched normally without the switch.
Ensure you have saved all your work and completely closed all Microsoft Office applications running in the background before performing these troubleshooting steps.
Run an Online Repair and Update Microsoft 365
Repairing your Office installation can fix missing or corrupted licensing components that cause activation checks to fail during automation.
The /automation switch alters the startup sequence of Excel. If the Office installation is slightly corrupted or out of date, this altered sequence may fail to trigger the necessary background licensing checks.
Press the Windows key, type 'Control Panel', and select it. Navigate to 'Programs' and then click on 'Programs and Features'.
Find Microsoft 365 in the installed programs list, right-click it, and choose 'Modify'. Select 'Online Repair' and follow the on-screen instructions.
Once the repair is complete, restart your PC. Open Excel normally, go to File > Account > Update Options, and click 'Update Now'.

Clear Office Registry Identities and Credentials
If repairing does not work, removing cached identities forces Office to request a fresh activation token.
Switch to WPS Office to Avoid Complex Licensing Errors
Tired of troubleshooting Microsoft Office activation issues and dealing with complex registry fixes? WPS Office provides a lightweight, highly compatible alternative that is free to use and easy to manage.
- 1. Download the Installer: Visit the official WPS website and click the free download button.
- 2. Install WPS Office: Run the setup file and follow the straightforward on-screen instructions.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheet and seamlessly open your existing .xlsx files.

Frequently Asked Questions
What does the /automation switch actually do in Excel?
The /automation switch forces Excel to start without loading add-ins, templates, or displaying the startup screen. It is typically used by developers and scripts to run automated COM (Component Object Model) tasks in the background.
Why does the unlicensed error only appear when using the /automation switch?
Because the switch modifies the normal startup sequence, it can sometimes bypass the standard licensing check triggers. If your locally cached credentials have a minor corruption, regular Excel might recover silently, but automated Excel fails and returns the unlicensed product error.
Will running an Online Repair delete my Excel spreadsheets?
No. Running an Online Repair only scans and fixes the Microsoft Office application files, registry entries, and shortcuts. Your personal files, spreadsheets, and documents will remain completely safe and untouched.




