1. Tomáš Podzimek
  2. PowerBuilder
  3. Friday, 20 September 2024 06:18 AM UTC

Hi,

We are testing a Powerclient installation (PB 22R3 3356).

Our app needs a dll which has to be registered in a special way - using regsvr32 with some extra parameters (serial number).

There is a DLL & OCX Registration button on the External Files tab for regular registrations - not suitable.

I believe our registration could be done in the Preload Event on the Startup tab.

And here's my question. How to make the registration run only during installation or first start?

There are only two options:

Only when the app first starts or is updated

or

Every time the app starts.

We could use a third option - Only when the app first starts.

Any ideas? Thanks in advance.

 

Tomáš

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 20 September 2024 07:58 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

I don't know how this works internally. In my opinion the real question is: dll are always registered (every time an update occurs) or only when those specific files are modified?

In your case it may be better to work with a script where you may be able to check if dll is already registered.

Andreas.

Comment
  1. Tomáš Podzimek
  2. Friday, 20 September 2024 08:08 AM UTC
Hi,

Thanks for your input.

The dll is never modified. It just exists and needs to be registered. Now, I don't mind registering it on every upgrade, but it needs to be done with administrator rights and most users don't have them. It would be annoying to chase an administrator for every update.
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Friday, 20 September 2024 14:50 PM UTC
Hi Tomáš,

I'm not sure if checking if the DLL is registered required admin rights, but if that were the case I would include an independent EXE whose only job is to load that DLL; and if it doesn't return a status code of 0 then I would assume the DLL is not registered.

That's what I would do in that case.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 September 2024 14:04 PM UTC
  2. PowerBuilder
  3. # 2

Hi Tomáš;

  FWIW: The way I have handled this is  ..

1) Use the "Only when the app first starts or is updated" option

2) In the PreLoad event call a .BAT file to handle the DLL registration

3) In the .BAT File, check to see if the DLL is registered. If so, ignore the regsvr32 processing.

HTH

Regards .. Chris

 

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.