1. Yves Belle-Isle
  2. PowerBuilder
  3. Friday, 7 May 2021 17:41 PM UTC

Hi guys,

We tried the new Powerclient feature and we solved many issues but one is still a big "no go" for the moment.

Since many years, we use text file with a proprietary extension to open our software and pass parameters.

Bascially, the extension is .IVL and we set the registry to open the software.exe with a -r "%1" parameters.

As you can imagine it did not work with Powerclient. It open the software, but don't go where it should with parameters.

We tried many things but nothing works.

Is there a way to do it works ?

Regards.

Romuald

Yves Belle-Isle Accepted Answer Pending Moderation
  1. Thursday, 13 May 2021 12:09 PM UTC
  2. PowerBuilder
  3. # 1

Hello ZhaoKai,

Yes, it's exactly what happend.

Thank you for the follow-up.

Romuald

Comment
There are no comments made yet.
Yves Belle-Isle Accepted Answer Pending Moderation
  1. Wednesday, 12 May 2021 18:17 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

 

Yes it works well with the native application since many years.

I joined a quick video to show you how it works.

- The .IVL is on the desktop and I show that it's only a text file.

- Because of the setting of the registry, when I double click on it, it open our software.

- Once open, our software read what is inside the .IVL and (in this example) open a specific document.

You already have the setting for the registry in my previous post and the function called in PB to read the .IVL

 

Hope you'll have a better view of how it works.

Regards.

Romuald

Attachments (1)
Comment
  1. Kai Zhao @Appeon
  2. Thursday, 13 May 2021 08:53 AM UTC
Hi Romuald,



Thanks for your description and video. So now the issue is that the IVL file can open PowerClient application but cannot pass file path (-r "%1") as commandline parameter to PowerClient application. Please correct me if I’m wrong.



I reproduced the issue on our end, sorry that there is no workaround for it at the moment. We will do further research to figure it out and will keep you posted on the progress.



Regards,

ZhaoKai
  1. Helpful
  1. Romuald Bezard
  2. Thursday, 17 June 2021 15:52 PM UTC
Hi ZhaoKai,



Any uppdate about the issue ?



Regards.



Romuald
  1. Helpful
There are no comments made yet.
Yves Belle-Isle Accepted Answer Pending Moderation
  1. Monday, 10 May 2021 14:48 PM UTC
  2. PowerBuilder
  3. # 3

Hello guys,

Thanks for the response but I will try to clarify what we do and how we work.

Our application send a reminder's email to employees for doing some job. Join with the email a file.IVL with some data (eg : FILE.ini M 40 1 10011000 D I-PO-ABC-003 1 0 0). As you can see, the file.IVL is dynamic and a new one is generate for each need.

When the employee double clic the .IVL, our application is open and then read the file.IVL(with path) to know what to do (enter in a specific window and start an action).

The way we set to open the .IVL is with registry :

reg add "HKCR\.IVL" /v "" /t REG_SZ /d Software_IVL /f
reg add "HKCR\Software_IVL " /v "" /t REG_SZ /d "Raccourcies du client Software" /f
reg add "HKCR\Software_IVL \DefaultIcon" /v "" /t REG_SZ /d %AppData%\PBApps\Applications\server\Software.exe /f
reg add "HKCR\Software_IVL \shell\open" /v "" /t REG_SZ /d "Open Document" /f
reg add "HKCR\Software_IVL \shell\open\command" /v "" /t REG_SZ /d ""%AppData%\PBApps\Applications\server\Software.exe" -r "%1"" /f

So, in the Event PFC_Open, we do :

if as_commandline <> "" and trim(as_commandline) <> '-r' and trim(as_commandline)<>'DebuggerTool=true' then
ls_arg = of_get_argument( as_commandline )

if ls_arg = "-r" then // raccourci
of_raccourci( as_commandline )
elseif ( ls_arg = "-f" ) then

is_isoini = of_setini( as_commandline ) // " pour of_get_argument
// dans of_setini
ls_arg = of_get_argument( as_commandline ) //Pour enlever le ini de la commande -f précédente
else
// commandline non reconnu
end if

if as_commandline <> "" and trim(as_commandline) <> '-r' then
ls_arg = of_get_argument( as_commandline )
if ls_arg = "-r" then // raccourci
of_raccourci( as_commandline )
end if
end if
else
is_isoini = of_setini( '' )
end if

Let me know if you need more details.

Regards.

Romuald

Comment
  1. Kai Zhao @Appeon
  2. Tuesday, 11 May 2021 08:20 AM UTC
Hi Romuald,



Does it work well on PB native application? Please provide a simple PB case that works well on PB but not on PowerClient to us for more study, thanks.



Regards,

ZhaoKai

  1. Helpful
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Saturday, 8 May 2021 08:13 AM UTC
  2. PowerBuilder
  3. # 4

Hi Romuald,

Does the software.exe refer to the exe of the PowerClient application? Is the issue that you cannot be sure about the application path? You can use GetCurrentDirectory ( ) to get the application path and then set the registry in the PowerClient application.

By default, the application path is %appdata%\PBApps\Applications\%your application%
For example:
C:\Users\appeon\AppData\Roaming\PBApps\Applications\localhost_pctest

If I have misunderstood, please provide a simple PB case and the detailed steps to reproduce the issue, thanks.

Regards,
ZhaoKai

Comment
There are no comments made yet.
Ronnie Po Accepted Answer Pending Moderation
  1. Friday, 7 May 2021 22:54 PM UTC
  2. PowerBuilder
  3. # 5

Hi Romuald,

Have you tried the following?

1. Create a .reg file (e.g. myfile.reg) to make the necessary registry changes.

2. Include the .reg file plus your .ivl file in the External Files section of the PowerClient project.

3. Add a command to the Run Options tab's Preload event section:

reg import myfile.reg

 

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.