This project is read-only.

Registering VFPDesktop Alert on Client machine

Topics: Attention VFPX Admins
Aug 27, 2008 at 6:28 AM
Kidos to Kevin for creating this great utility.
Great whitepaper too!

I compile the project and generate vfpalert.exe. I then ran the sample and it works great.
Next i distribute vfpalert.exe to the client machine. I register it (vfpalert.exe /regserver)
When I ran the sample, there is no error message - but the object (vfpalert.Alertmanager) does not get created.

I tried the DLL approach, and that too is not working.

Any ideas as to what I might be doing wrong.


_Ajit Abraham

Aug 27, 2008 at 9:02 PM
My apologies for the late reply. In order to register it as a COM server, it has to be run as an Administrator (along with the /regserver switch).

Aug 28, 2008 at 10:43 AM
Thanks for your reply, Kevin.

It was run as an administrator. I checked the registry and the entries were present.

My development machine has SP2(VFP) installed. But the client machine still had the SP1 runtimes.
I then installed the VFP9SP2RT (from problib) on the client machine and then, the Alerts *worked*.

I have a new problem in hand when I running the VFPALERT.EXE /REGSERVER through my program.
I copy the VFPALERT.EXE into the application directory of the client machines.
(The directory can be different for different clients)

LOCAL lcCommand
RUN &lcCommand

This fails to register. But if I hard code it,  like
it works.
The debug output of lcCommand, shows exactly the same path and filename which I hardcoded

In the meantime, I am manually registering the activex in all the client machines.


_Ajit Abraham

Aug 28, 2008 at 10:02 PM

I wasn't able to recreate the problem as shown.

But, when I moved the VFPAPP folder to Program Files, it did not register. Since the path had a space I had to change the command to:

lcCommand = ["] + FULLPATH("VFPALERT.EXE") + [" /REGSERVER]
RUN &lcCommand

But this didn't work, either. So, I added the /N switch to the RUN command.

RUN /N &lcCommand


Hope this helps,

Aug 29, 2008 at 1:08 PM
Hi Kevin, Thanks for your reply.

The /N parameter, popped up a message that RUN command has failed and that it cannot find the file specified.

This is really very strange. Because, if I put a SET STEP ON just before the RUN command, and then RUN &lcCommand in the command prompt window, it works!
The RUN does not work in my prg file. I wonder why?

I then put the entire statement into a variable and used EXECSCRIPT

This works!!
Putting a /N in the above command, does not show the brief DOS box while executing the statement.

Whew, finally done (even if some questions are still unanswered)

Thanks Kevin, for your time and effort.


_Ajit Abraham

Sep 29, 2008 at 8:43 AM
Hi!, all

I compile the project generate and register vfpalert.exe. I then ran the sample and it works great.
I compile the project generate and register vfpalert.dll. I then ran the sample and it doesn't show the alert window.


Sep 30, 2008 at 5:52 PM

Kevin will be right person to answer you, but I guess vfpalert can only be run as an outprocess server ie vfpalert.exe.
I might be wrong.


_Ajit Abraham
Oct 1, 2008 at 12:52 PM
Hi Doru,

Ajit is correct. It can only be compiled as an out-of-process (EXE) server.

Sorry for the late reply. I've been out of town for the last 3 days.

Oct 2, 2008 at 6:34 PM
Thanks for reply Ajit and Kevin.