Codejock com server registrator

broken image
broken image

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'. You can check on MSDN a detailed overview of the ShellExecute method. ShellExecute(Handle(This), ls_command, ls_file, ls_parm, ls_nullStr, 9) Ls_parm = 'codejock_calendar.ocx' 'Set this to the path of your ocx Ls_command = 'runas' 'You can use here 'open' if using Pre-Vista OS String ls_command, ls_file, ls_parameter, ls_null

broken image

In your application's Load event, you can use the ShellExecute to register the ocx using RegSvr32 command. You can try this out:įirst, create an External Function for Windows' ShellExecute() method (like the code below)įunction Long ShellExecute(Long hWnd, ref String lpOperation, ref String lpFile, ref String lpParameters, ref String lpDirectory, Long nShowCmd) Library 'shell32.dll'

broken image