During large-scale Java deployments, we often encounter situations where the MSI installer gets suspended mid-process, especially when running as SYSTEM account. The Windows Installer service keeps track of these interrupted installations through its internal database, preventing subsequent installations until the suspended state is resolved.
The key error messages reveal the core issue:
Error 1704. An installation for Java 7 Update 10 is currently suspended. You must undo the changes made by that installation to continue.
This occurs because the Windows Installer maintains a rollback script (typically in %windir%\Installer) that must be either completed or rolled back before new installations can proceed.
While GUI installations allow interactive resolution, automated deployments require command-line solutions. Here are three effective approaches:
Method 1: Using msiexec with Resume Option
msiexec /i "Java 7 Update 10.msi" /qn /norestart /l*v "C:\install.log" RESUME=Y
Method 2: Forced Rollback via MSI API
Create a VBScript to programmatically clear the suspended state:
Set installer = CreateObject("WindowsInstaller.Installer")
Set products = installer.ProductsEx("", "", 7)
For Each product In products
If InStr(1, product.InstallProperty("ProductName"), "Java 7 Update 10") > 0 Then
installer.ConfigureProduct product.ProductCode, 0, 2
End If
Next
Method 3: Direct Registry Cleanup
Warning: Only use this if other methods fail. Backup registry first.
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Rollback /f
- Always include
/norestart
flag to prevent unexpected reboots - Implement proper error handling in deployment scripts
- Consider using TRANSFORMS to customize installations
- Test deployments on subset machines before full rollout
If problems persist:
- Check Windows Installer service status (
sc query msiserver
) - Examine Event Viewer logs under Applications
- Verify disk space availability
- Check for pending reboots (
reg query HKLM\SYSTEM\CurrentControlSet\Control\Session Manager /v PendingFileRenameOperations
)
Remember that suspended installations consume system resources and may cause registry bloat if not properly cleaned up.
When deploying Java 7 Update 10 via MSI packages across our enterprise network, approximately 50% of machines encountered frozen installations. This left the Windows Installer service in a suspended state, blocking subsequent deployment attempts with these errors:
User 'SYSTEM' has previously initiated an install for product 'Java 7 Update 10'.
That user will need to run that install again before they can use that product.
Error 1704. An installation for Java 7 Update 10 is currently suspended.
You must undo the changes made by that installation to continue.
Windows Installer maintains a transaction log in the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress
. When an installation fails or is interrupted, this registry key holds details about the pending operation.
For silent installations, this becomes particularly problematic because:
- The UI prompt for rollback doesn't appear
- The installation process halts completely
- Subsequent installations are blocked
Here are three technical approaches to resolve suspended installations:
Method 1: Using MSIEXEC with Reset Parameter
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83217025FF} /qn /norestart
The product code {26A24AE4-039D-4CA4-87B4-2F83217025FF}
is specific to Java 7 Update 10. For other products, you'll need to find their GUIDs in the registry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
.
Method 2: Registry Cleanup Script
Create a PowerShell script to clean the installer cache:
# PowerShell cleanup script
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress"
if (Test-Path $RegPath) {
Remove-ItemProperty -Path $RegPath -Name "*" -Force
}
# Additional cleanup for pending file rename operations
$PendingRename = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager"
if (Test-Path "$PendingRename\PendingFileRenameOperations") {
Remove-ItemProperty -Path $PendingRename -Name "PendingFileRenameOperations" -Force
}
Method 3: Using Windows Installer API
For advanced scenarios, you can use VBScript to interface directly with the Windows Installer API:
' VBScript to reset installer state
Set installer = CreateObject("WindowsInstaller.Installer")
installer.InstallProduct "YourPackage.msi", "REINSTALL=ALL REBOOT=REALLYSUPPRESS"
To avoid suspended installations in future deployments:
- Always include
/norestart
in silent install commands - Implement proper error handling in deployment scripts
- Use transaction logging with
/l*v C:\install.log
- Consider using deployment tools like SCCM or PDQ that handle rollback automatically
For large-scale Java deployments:
- Test installations on a representative sample of machines
- Stage deployments in batches
- Monitor installation success/failure rates
- Implement a pre-deployment check for existing installations
Sample pre-check batch script:
@echo off
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress" >nul 2>&1
if %errorlevel% equ 0 (
echo WARNING: Pending installation found
call :cleanup
) else (
echo System clear for installation
)
exit /b
:cleanup
msiexec /x {26A24AE4-039D-4CA4-87B4-2F83217025FF} /qn /norestart
exit /b