I would like to use command line to locate the path of MS office. It should return something like C:\Program Files (x86)\Microsoft Office\Office14
which might differ to different users.
Tried using:
where WINWORD.EXE
INFO: Could not find files for the given pattern(s).
for %i in (WINWORD.EXE) do @echo. %~$PATH:i
No output
Thanks for any help
Click the Link tab and add msi. lib in the list of Object/library modules. Run the program. It will display the file path where Microsoft Word is installed.
Opening document from the command lineOpen the Windows command line. Get to the directory containing the Microsoft Word document using the cd command. Once in the directory containing the document, use the start command to start the document in Windows. For example, if the document is called "example.
One starting point is the registry entries for application registration
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WINWORD.EXE"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With