Registrator
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=17702
Printed Date: 21 November 2024 at 8:39am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Registrator
Posted By: Access2007
Subject: Registrator
Date 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
|
Replies:
Posted By: dindo.lales
Date 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
|
Posted By: Access2007
Date 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
|
|