Dynamically loading Redemption.dll

Access9001

Registered User.
Local time
Today, 08:18
Joined
Feb 18, 2010
Messages
268
Is there a way to have Redemption.dll automatically loaded/registered/referenced in Access VBA? Right now I am using:


Sub regRedemption()
Dim redPath as string
redPath = "C:\Redemption.dll" 'or whatever other path
shell "regsrv32.exe " & redPath, vbMaximizedFocus
End Sub


Only problem is that it seems to require some clicks/etc. I want this all to just be done by itself.
 
Yes, there is. You can program your front-end interface to perform the following tasks upon startup:
* Check for the existence of the Redemption.dll file on the client computer. If it already exists, skip this procedure and resume the rest of your front-end's startup.
* Copy the Redemption.dll file from a shared server-side location to the client computer.
* Register the Redemption.dll file using the shell command. Example:
Code:
Shell "RegSvr32 C:\WINDOWS\SYSTEM32\Redemption.dll"
* Proceed with the rest of your front-end's startup.


NOTE: To avoid compile errors in your front-end if Redemption.dll is not yet installed/registered, do not use early-binding to Redemption objects. Example:
Code:
Dim Session As Redemption.RDOSession
Set Session = New Redemption.RDOSession
Instead, use late-binding. Example:
Code:
Dim Session As Object
Set Session = CreateObject("Redemption.RDOSession")
 
I already have it doing this -- the problem is the point where I am using regsrv32. It doesn't seem to follow through with the registration automatically. It brings up a window with an agree/disagree OK/cancel box and only when I click the radio button/press OK do I register Redemption and open up the reference so I can include it in my VBA. How do I automate that process or avoid it altogether?
 
Try using the Silent switch.

Code:
Shell "RegSvr32 [B][COLOR="Blue"]/S[/COLOR][/B] C:\WINDOWS\SYSTEM32\Redemption.dll"
 
Try modifying your code like this:

Code:
[COLOR="navy"]Sub[/COLOR] regRedemption()

[COLOR="navy"]Dim[/COLOR] redPath [COLOR="navy"]As String[/COLOR]
redPath = "C:\Redemption.dll" [COLOR="DarkGreen"]'or whatever other path[/COLOR]
Shell "regsrv32.exe /s """ & redPath & """"

[COLOR="navy"]End Sub[/COLOR]

You do not need the vbMaximizedFocus WindowStyle flag for this Shell call.
 
It still comes up.

Is there a way I can just automatically make it select "Agree" and hit OK?
 
Then your computer has gremlins. There is nothing more we can do for you. I have deployed such solutions with the Redemption.dll file on machines elsewhere, and the /S switch in the command string worked perfectly on all of them.
 
Do you not get this prompt when you run it?

agree.png


Do I need to buy the distributable version in order to make this automated?
 
Ahhhhh, there's your problem! Yes, you DO need to purchase the distributable version.
 
Ah, my bad. XD

Sorry for not being more accurate with my problem. Thanks!
 

Users who are viewing this thread

Back
Top Bottom