How to Find the Correct Excel Application Path for the Runas Command
Question details
The user needs to locate the universal executable path for Microsoft Excel to properly execute the runas command across different computers.

- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Running Excel under different user credentials using the command line runas utility.
- Observed behavior
- Hard-coded Excel paths fail on different machines because the installation folder changes depending on the installed Microsoft Office version (e.g., Office16, Office15).
Ensure you have the exact username and password credentials for the secondary account you intend to use with the runas command.
Manually Locate the Executable Path via Shortcut
The most reliable way to find the exact Excel path for a specific computer is to check the properties of the Windows Start menu shortcut.
Because Office installation directories vary based on the version (such as Office 2013 vs Office 2016) and system architecture (32-bit vs 64-bit), tracing the active shortcut guarantees you find the correct executable file.
Open the Windows Start menu, type 'Excel' into the search bar, right-click the Microsoft Excel application icon, and select 'Open file location'.
In the File Explorer window that opens, right-click the Excel shortcut file and select 'Properties' from the context menu.
Navigate to the 'Shortcut' tab. Highlight and copy the exact file path listed in the 'Target' field. This is the correct EXCEL.EXE location for your machine.
Open Command Prompt and enter your runas command using the copied path. For example: runas /user:Domain\Username "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE".

Use a Batch Script to Detect the Office Installation Path
If you need to run Excel on multiple computers with different Office versions, you can use a script to dynamically detect the correct path.
Switch to WPS Office for a Hassle-Free Experience
Tired of dealing with complicated installation paths and versioning issues across different computers? WPS Office offers a free, lightweight alternative that features a consistent installation directory and is fully compatible with Microsoft Excel formats.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installer for Windows.
- 2. Install the Suite: Run the setup file and follow the on-screen instructions to install WPS Office on your computer.
- 3. Open Excel Files: Launch WPS Spreadsheet and instantly open your existing .xlsx or .xls files without any formatting loss.

Frequently Asked Questions
What is the default installation path for Office 365 Excel?
For most 64-bit Windows installations, Office 365 installs Excel in C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE. If you installed the 32-bit version on a 64-bit OS, it will be located in the Program Files (x86) folder instead.
Why doesn't my runas command work even when I have the correct Excel path?
If your file path contains spaces (which is common for Windows directories like Program Files), you must wrap the entire file path in double quotation marks. Otherwise, the command prompt will misinterpret the spaces as separate command arguments.
How do the Microsoft Office version folders like Office16 and Office15 differ?
Microsoft labels its installation folders based on internal version numbers. The 'Office16' folder corresponds to Office 2016, 2019, 2021, and Office 365. The 'Office15' folder corresponds to Office 2013, and 'Office14' corresponds to Office 2010.




