Fix it now
12002-4 is WinINet’s ERROR_INTERNET_TIMEOUT wrapped in an Office setup code: the request went out and nothing answered in time. Microsoft attributes the whole family to the internet connection, antivirus software, a firewall or proxy settings, and recommends the offline installer first because it takes the slow path out of the picture entirely.
netsh winhttp show proxy
curl.exe -v -I https://officecdn.microsoft.com
nslookup officecdn.microsoft.com
- If
netsh winhttp show proxyreports Direct access on a network that requires a proxy, import the browser configuration:netsh winhttp import proxy source=ie. - Watch how long
curl.exetakes. A response that arrives slowly and a response that never arrives point at different things, and the timing is the evidence. - For anything more than one or two machines, download the build once with the Office Deployment Tool and install from a local share, so the proxy carries it once instead of fifty times.
- If the code is 12007-4 rather than a timeout, stop looking at the proxy’s speed. That code is a name that never became an address.
There is no supported setting that lengthens the installer’s timeout, and lengthening it would be the wrong fix anyway – the next build is larger than this one.
If setup completes you can stop here. If not, the next section explains what each of the three numbers actually reports and why they should not be treated as one problem.
Why it happens
These three codes are Windows internet error numbers with an Office setup suffix bolted on, and they are worth reading literally rather than as a single family. 12002 is ERROR_INTERNET_TIMEOUT, published as “The request has timed out”. 12007 is ERROR_INTERNET_NAME_NOT_RESOLVED, “The server name could not be resolved”. 12152 is ERROR_HTTP_INVALID_SERVER_RESPONSE, “The server response could not be parsed”.
Those are three different events. Nothing answered. The name never became an address. Something answered and the reply made no sense to the client. They share a Microsoft support page and a single stated cause – your internet connection, antivirus software, firewall or proxy settings preventing Office installing over the internet – but they do not share a diagnosis, and the number in front of you narrows the search considerably.
Volume is the part people underestimate. A full Office build is a substantial download, and a gateway that copes with ordinary browsing can time out under a sustained transfer, particularly if it is scanning the content as it passes. That is why installations often succeed at seven in the morning and fail at eleven, and why the same machine works from a hotspot.
Two companion codes turn up in the same tickets and both are worth reading carefully. 30169-22 has a Microsoft support page that publishes no cause at all; its remedies are restart, then uninstall with the troubleshooter and reinstall. And 3-4 is documented as an installation failing during the configuration phase, which Microsoft notes can happen when you are adding more Microsoft 365 products. That is after the download rather than during it, so a 3-4 is not evidence of a slow link.
Services have no proxy configured while the browser does
You have this one if netsh winhttp show proxy reports a direct connection on a network where nothing reaches the internet directly, and browsing works normally.
- Run
netsh winhttp import proxy source=iefrom an elevated prompt to copy the browser configuration for system service use. - Confirm the result with
netsh winhttp show proxy. - If the machine-level setting is wrong rather than missing, clear it with
netsh winhttp reset proxyand set it correctly.
This setting is machine-wide and applies to background services. It is deliberately separate from each user’s browser configuration, which is why the two drift apart.
The proxy or the link cannot sustain the transfer
You have this one if The timeout arrives part way through a long download and the stall point moves between attempts.
- Run the same install out of hours on the same machine. Success then confirms load rather than configuration.
- Ask whether the proxy scans or buffers large downloads, and whether the Office content hostnames can be exempted from that scanning.
- Download once with the Office Deployment Tool and install from a local share for everything after the first machine.
The code is 12007-4, so resolution never happened
You have this one if The name-resolution code rather than the timeout, and nslookup officecdn.microsoft.com returns nothing useful.
- Test resolution on the client first:
nslookup officecdn.microsoft.com. - If the client resolves but the install still fails, the proxy is resolving on the client’s behalf and its own DNS is the thing to look at.
- Clear the client cache with
ipconfig /flushdnsbefore retesting so you are not reading a stale answer.
The code is 12152-4, so something answered with the wrong thing
You have this one if The invalid-server-response code, usually on a network with a captive portal, a filtering appliance or a device that terminates TLS.
- Look at what
curl.exe -v -Iactually returns. A portal login page or an appliance block page instead of a Microsoft response is the whole answer. - Ask for the Office content and configuration hostnames to be excluded from content inspection.
- Complete any captive portal sign-in before starting setup, and retest.
A proxy configuration script is slow or does not match
You have this one if Timeouts vary widely between machines on the same network and a PAC file is in use.
- Test with a static proxy setting on one machine to take the script out of the path.
- If that fixes it, review the script for slow lookups or rules that never match the Office hostnames.
- Add an explicit entry for the Microsoft 365 hostnames rather than relying on a general rule to catch them.
Full reference
What each number is actually reporting
| Code | WinINet constant | Published meaning |
|---|---|---|
12002-4 |
ERROR_INTERNET_TIMEOUT | The request has timed out |
12007-4 |
ERROR_INTERNET_NAME_NOT_RESOLVED | The server name could not be resolved |
12152-4 |
ERROR_HTTP_INVALID_SERVER_RESPONSE | The server response could not be parsed |
30169-22 |
Not a WinINet code | Microsoft’s page publishes no cause; restart, then uninstall and reinstall |
3-4 |
Not a WinINet code | Installation failed during the configuration phase, possibly while adding products |
Proxy commands worth having open
| Command | What it does |
|---|---|
netsh winhttp show proxy |
Shows the machine-level proxy that system services use |
netsh winhttp import proxy source=ie |
Copies the current browser configuration into that machine-level setting |
netsh winhttp reset proxy |
Clears it, returning services to a direct connection |
netsh winhttp set proxy proxy-server=<server> bypass-list=<hosts> |
Sets it explicitly, with a bypass list |
curl.exe -v -I https://officecdn.microsoft.com |
Makes a real request and shows what came back, and how quickly |
Doing it once instead of fifty times
- On a machine with a working path, run
setup.exe /download configuration.xmlfrom an elevated prompt to build a local source. - Put that source on a file share the client machines can reach.
- Point the deployment configuration’s SourcePath at the share and run
setup.exe /configure configuration.xmlon each client. - The proxy then carries one download rather than one per machine, which removes the load problem instead of arguing about it.
- Sign-in and activation still go over the network afterwards, so keep the identity and licensing endpoints open.
Where a different code changes the answer
- A 3-4 means setup got past the download and failed while configuring. Check whether something is adding a second product at the same time, and reinstall rather than tuning the gateway.
- A 30169-22 has no published cause. Microsoft’s own remedy is restart, then the uninstall troubleshooter and a reinstall, so treat it as local damage.
- A 30125-1011 or 30174-4 in the same sequence points at antivirus, firewall or proxy settings and has its own documented steps.
- A 30068 means the Microsoft Office Click-to-Run service is worth checking in
services.msc. - If the code changes on every attempt, you have an unstable path rather than a fixed rule, and out-of-hours testing will tell you which.
Why browsing works while setup does not
Browsing runs as the signed-in user, with that user’s proxy settings and, where the gateway asks for them, that user’s credentials. Parts of a Click-to-Run installation run as a system service, with the machine-level WinHTTP proxy and no user sitting behind it. The two paths are genuinely different, which is why netsh winhttp show proxy is the first command in this article rather than a browser settings page.
That also explains why the fix so often lives on the gateway rather than the PC. Where the Microsoft 365 endpoints can be permitted without content inspection, the transfer stops timing out and stays fixed. Where they cannot, a local source is the honest workaround, and it is one you can put in place today without waiting for a change window.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
12002-4 |
WinINet ERROR_INTERNET_TIMEOUT: the request has timed out. Microsoft attributes the family to the connection, antivirus, firewall or proxy settings | Microsoft Learn |
12007-4 |
WinINet ERROR_INTERNET_NAME_NOT_RESOLVED: the server name could not be resolved | Microsoft Learn |
12152-4 |
WinINet ERROR_HTTP_INVALID_SERVER_RESPONSE: the server response could not be parsed | Microsoft Learn |
30169-22 |
Microsoft publishes a page for it but no cause; its remedies are a restart, then uninstall with the troubleshooter and reinstall | Microsoft Support |
3-4 |
The installation failed during the configuration phase, which can happen when adding more Microsoft 365 products | Microsoft Support |
Confirm the fix worked
netsh winhttp show proxymatches what the network actually requires.curl.exe -I https://officecdn.microsoft.comreturns promptly rather than eventually.- Setup completes with no rollback and Word opens without a setup prompt.
- An update check from File, then Account, then Update Options finishes, proving the path stays usable after installation.
- If you built a local source, install a second machine from it and confirm the gateway is no longer in the transfer path.
Questions people ask about this
Is there anything to buy here?
No. This is transport and proxy configuration. No Office licence changes how long a gateway takes to answer, and setup has not reached the licensing stage.
Can I raise the installer’s timeout?
There is no supported setting for it, and it would be the wrong fix. A path that needs a longer timeout to finish this build will fail on the next one, which is larger.
Why does browsing work when setup does not?
Browsing uses the signed-in user’s proxy configuration and credentials. Parts of setup run as a system service using the machine-level WinHTTP proxy with no user behind it. They are different paths and only one of them is broken.
Is bypassing the proxy for Microsoft traffic reasonable?
It removes load from the gateway as well as fixing this, and Microsoft’s own remedy list for the family includes disabling proxy settings for the install. The decision belongs to your security team; keep any bypass limited to the published Microsoft 365 endpoints.
I got 12007-4, not 12002-4. Same article?
Same page at Microsoft, different problem in practice. 12007 is a name that never resolved, so start with nslookup and the DNS servers rather than with the proxy’s throughput.
