Skip to main content
Participant
November 29, 2022
Answered

How to find exe location using Registry Key

  • November 29, 2022
  • 1 reply
  • 485 views

Hi,

I am trying to use 

var createProcessResult = window.cep.process.createProcess("C:/Program Files (x86)/Microsoft Office/root/Office16/WINWORD.EXE");
to launch Word Application.
But since the path to the WinWord exe can be different for users. So I am looking for a method to find the WinWord exe path programmatically. Probably by reading registry key values.
Please let me know if any CEP API can help me in doing this.
This topic has been closed for replies.
Correct answer Loic.Aigon

I would rather consider using VB that you can run from app.doScript. 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html#d1e42253__d1e45802

Don't have windows at hand but your vb might be like this:

Set appWD = CreateObject("Word.Application")

And you wouldn't worry about the exe location.

Plus you could automate more than just opening the app.

FWIW

Loic

1 reply

Loic.Aigon
Loic.AigonCorrect answer
Legend
November 29, 2022

I would rather consider using VB that you can run from app.doScript. 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html#d1e42253__d1e45802

Don't have windows at hand but your vb might be like this:

Set appWD = CreateObject("Word.Application")

And you wouldn't worry about the exe location.

Plus you could automate more than just opening the app.

FWIW

Loic