1. Balasubramaniam N
  2. PowerBuilder
  3. Thursday, 9 January 2020 10:32 AM UTC

Hi All,

I am trying to open a PowerBuilder Application from other PowerBuilder application using Run()

Run('C:\systempath\example.exe')

But "example.exe" application is opening when run it by double click on .exe, it is not opening only when we try to execute via Run(). Is this because of Build Issue or any DLL missing?

Both Applications are migrated from 12.6 to 2019.

Please give some suggestions to resolve the issue. Thanks in advance

Balasubramaniam N Accepted Answer Pending Moderation
  1. Friday, 10 January 2020 09:55 AM UTC
  2. PowerBuilder
  3. # 1

Hi Michael/Chris,

The Child app is opening when we run it by double clicking on .exe and by command prompt.

But the requirement is we should open the Child app from Master app, so that I am using Run().

Is this because of Build/Deploy issue?

 

Comment
  1. Michael Kramer
  2. Friday, 10 January 2020 09:59 AM UTC
The issue most likely is caused by "current directory" vs. "path/AppPath" vs. path included in Run command.

What happens in a command prompt where you have current directory = Master app's directory and you type exactly the path+filename that you use in the Run-command to start Child app?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 9 January 2020 16:40 PM UTC
  2. PowerBuilder
  3. # 2

Hi Balasubramaniam;

   I am confused as you state "But it example.exe application is opening". So in that case, what is the problem?

Regards ... Chris

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 9 January 2020 10:57 AM UTC
  2. PowerBuilder
  3. # 3

My "names": Master app = app in which the Run(...) call exists. Child app = app to be started by the Run(...) call.

What happens if on same machine in command prompt you try to run the Child app using exactly the same string as you put in the Run(...) call?

Under normal circumstances both should work or both should fail.

If Child app needs special environment setup => Try create .BAT/.CMD file or even a .PS1 file to setup environment prior to starting the app. Then let your Master app call that .BAT/.CMD/.PS1 file. NOTE: For security reasons it is somewhat more complex to start a .PS1 file.

HTH /Michael

Comment
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.