Make Office repairs using command line

A simple command-line method of repair will become an important addition to your toolbelt if Office 2000 or Office XP installations become corrupted.

Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize!


Sometimes it's warranted to perform a repair of the installed MS Office application. You can initiate this repair by using a simple command-line method.

The command-line method will become an important addition to your toolbelt should your MS Office 2000 or Office XP installations become corrupted. Using the command-line method, you can perform this procedure remotely or through a package distributed via the SMS delivery system.

The Command-Line
path\setup.exe /fx Msifile.msi

(Where path is the folder where the Setup.exe file is located, 'x' is the repair option, and Msifile.msi is the *.msi file you are using)

The /f switch is the option to initiate a repair. The important feature of this switch is the repair option you want to provide. Office has several command-line options for the repair.

Repair Switch Options

/fp
Reinstall only if file is missing, or verify the file is present.

/fo
Reinstall if file is missing, or an earlier version is present.

/fe
Reinstall if file is missing, or an equal or earlier version is present.

/fd
Reinstall if file is missing, or a different version is present.

/fc
Reinstall if file is missing or corrupt. This option only repairs files that have msidbFileAttributesChecksum in the Attributes column of the File table.

/fa
Force all files to be reinstalled, regardless of checksum or version.

/fu
Rewrite all required registry entries from the registry table that go to the HKEY_CURRENT_USER or HKEY_USERS registry keys.

/fm
Rewrite all required registry entries from the registry table that go to the HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry key. Rewrite all information from the Class table, Verb table, PublishComponent table, ProgID table, MIME table, Icon table, Extension table, and AppID table regardless of computer or user assignment. Reinstall all qualified components.

/fs
Reinstall all shortcuts and re-cache all icons, overwriting any existing shortcuts and icons.

/fv
Use to run from the source package and re-cache the local package.

 


Rod Trent, manager of myITforum.com and a Microsoft MVP, is an expert on Microsoft Systems Management Server. He has more than 18 years of IT experience -- eight of which have been dedicated to SMS. He is the author of Microsoft SMS Installer, Admin911: SMS, and IIS 5.0: A Beginner's Guide and has written thousands of articles on technology topics.

This article first appeared in myITforum.com, the online destination for IT professionals who manage their corporations' Microsoft Windows systems and is also part of the TechTarget network of industry specific IT web sites. The centerpiece of myITforum.com is a collection of member forums where IT professionals exchange technical tips, share their expertise and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS).

This was first published in May 2005

Dig deeper on Microsoft Windows Data Backup and Protection

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close