Fix Office 2016 Click-to-Run Batch Installation Credential Errors
Question details
The user is experiencing credential errors when running an Office 2016 Click-to-Run installation via a batch file, whereas running the command manually succeeds.

- Product
- Microsoft Office 2016
- Device & OS
- not provided
- Scenario
- Deploying Office 2016 using the Office Deployment Tool from a network share via an automated batch script.
- Observed behavior
- The installation works interactively by prompting for credentials but fails with an incorrect username or password error when executed through a batch file where no interactive prompt occurs.
Verify that the account executing the batch script has read permissions for the network share containing the Office installation files, and ensure the target machine is properly connected to the domain or network.
Map Network Drive with Credentials Before Execution
Pre-authenticate the network share within the batch file so the Office Deployment Tool (ODT) command doesn't fail due to missing credentials.
Because batch scripts execute non-interactively, they cannot prompt the user for credentials when accessing a secured network share. You can bypass this by mapping the drive temporarily using the 'net use' command with the appropriate credentials before calling the ODT setup.
Right-click your deployment batch file (.bat or .cmd) and select 'Edit' to open it in Notepad.
Before the setup.exe command, insert a line to authenticate the share: net use \\Server\Share /user:Domain\Username Password
Ensure your standard ODT command follows the authentication line: setup.exe /configure configuration.xml
Add a cleanup line at the end of the script to remove the connection: net use \\Server\Share /delete
Execute the Batch File in the Correct Context
Run the deployment script under an account that already possesses the necessary permissions to access the network share, eliminating the need to pass credentials.
Switch to WPS Office for a Hassle-Free Deployment
Avoid complex Office Deployment Tool configurations, script writing, and network credential errors. WPS Office offers a lightweight, highly compatible alternative to Microsoft Office that is incredibly easy to install and manage across your organization.
- 1. Download the Installer: Visit the official WPS website and download the standalone installation package.
- 2. Run the Setup: Execute the lightweight installer, which completes in minutes without requiring complex network configurations or administrative credential passing.
- 3. Open Your Office Documents: Launch WPS Office to immediately open and edit your existing Microsoft Office documents with perfect compatibility.

Frequently Asked Questions
Why does the Office Deployment Tool work manually but fail in a batch script?
When running the command manually (such as via the Run dialog), Windows can interactively prompt the user for missing network share credentials. Batch scripts run non-interactively by default, so if credentials aren't already cached, the script fails automatically instead of pausing to ask for a password.
How can I safely pass credentials in an Office deployment script without plaintext passwords?
Instead of putting plaintext passwords in the script using the 'net use' command, map the deployment network share beforehand using Active Directory Group Policy, or run the deployment script via an endpoint management system under a service account that already has native read access to the share.
Where can I get further help for Office Deployment Tool scripting?
Microsoft provides dedicated support via the Microsoft Q&A forums. You can post your script details and execution environment there, tagging the post with 'Office Deployment' to get specialized assistance from deployment engineers.




