1. Saravanakumar Thangapandian
  2. PowerServer 2020 or older (Obsolete)
  3. Wednesday, 11 November 2020 09:53 AM UTC

Hello Everyone,

When I try to open chrome browser thru Run option in Power Builder Run("chrome.exe"), it is not opening the chrome browser.

But if I specify the full path of chrome exe it opens the chrome browser successfully.

Run ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")

My doubt here is, is this path can be hard coded in the application? Will it be same for different versions of windows.

If the path will be different for different windows installation, how can I get the chrome installation path dynamically from Power Builder.

Anyone have any code samples?

 

Regards,

Saravanan.

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 11 November 2020 14:53 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

Look in the Windows Registry?

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
Value Name: (Default)

On my system, this is set to: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

Comment
  1. Saravanakumar Thangapandian
  2. Wednesday, 11 November 2020 15:07 PM UTC
Thanks John, in my system also this particular registry is giving the correct chrome installation path.

Will the registry key be same for different version of windows installation?
  1. Helpful
  1. John Fauss
  2. Wednesday, 11 November 2020 15:20 PM UTC
I would think so, but then, I don't work for Google. If you have access to alternative versions (I'm using Windows 7, by the way), I would check each of them. Perhaps others in the Appeon Community will check their systems and chime in?
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 November 2020 14:41 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Why not use the new Chromium WebBrowser control that is built-in to PowerBuilder?

Comment
  1. Saravanakumar Thangapandian
  2. Wednesday, 11 November 2020 15:12 PM UTC
Thanks Armeen for your suggestion.

But we would like to open a new browser instance from an menu option. This chromium web browser control will be restricted with in a window and have limited browsing navigation options.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 11 November 2020 15:47 PM UTC
Oh I see... just keep in mind you are now creating dependencies of your app that can cause it to break. For example, if the user doesn't have Chrome installed or if for some reason the user's Chrome installation/registry is corrupted. Built-in doesn't have all the navigation options, but I think it is more reliable approach. Anyway, good luck!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.