Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Registrator
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Registrator

 Post Reply Post Reply
Author
Message
Access2007 View Drop Down
Groupie
Groupie
Avatar

Joined: 21 April 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Access2007 Quote  Post ReplyReply Direct Link To This Post Topic: Registrator
    Posted: 18 December 2010 at 9:51am
Hi I was hoping someone could help me out with what I imagine is a simple problem.
I have developed an application using the active x calendar  and Access. It is working fine on my development computer.
When I deploy the application, the only way I have been able to get the calendar to work is if I put the registrator.exe file on the user computer, then double click the registrator.exe file and click the register button.
What I am doing wrong that I have to do this?
If this is how it is supposed to be, then is there an easy way to automate this process so that it happens automatically when the application is installed? (I am using the Access developer extensions)
thanks for your help!
Windows 7 Pro 64
Access 2007
Calendar 15.3.1
Back to Top
dindo.lales View Drop Down
Groupie
Groupie


Joined: 01 August 2010
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote dindo.lales Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2011 at 9:15pm
I have that same problem before. You can try this out:
First, create an External Function for Windows' ShellExecute() method (like the code below)

Function Long ShellExecute(Long hWnd, ref String lpOperation, ref String lpFile, ref String lpParameters, ref String lpDirectory, Long nShowCmd) Library "shell32.dll"

In your application's Load event, you can use the ShellExecute to register the ocx using RegSvr32 command.

'Declare variables
String ls_command, ls_file, ls_parameter, ls_null

ls_nullStr = Null
ls_command = "runas" 'You can use here "open" if using Pre-Vista OS
ls_file = "regsvr32"
ls_parm = "codejock_calendar.ocx" 'Set this to the path of your ocx
               
'Call ShellExecute
ShellExecute(Handle(This), ls_command, ls_file, ls_parm, ls_nullStr, 9)

You can check on MSDN a detailed overview of the ShellExecute method.
Using this approach will have the user account control dialog to appear, which asks "Do you want to allow the following program to make changes to this computer". Of course you have to click Yes so that the ocx will be registered. Just add your own code to check whether the ocx is already registered or not before the actual ocx registration.
A better method is to create you application installer and have the ocx registered during the installation.
Product: Xtreme Calendar (ActiveX) version 13.4.0
Platform: Windows 7 Professional (32bit)
Language: Powerbuilder 11.5
Back to Top
Access2007 View Drop Down
Groupie
Groupie
Avatar

Joined: 21 April 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Access2007 Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2011 at 8:36am
Thank you very much. This solved the problem!
Windows 7 Pro 64
Access 2007
Calendar 15.3.1
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.145 seconds.