> >
> > As you found, you don't need to use any COM or EXE because ShellExecute() automatically opens the associated windows application for the file. Since the file in this case is a .REG file, then RegEdit.EXE is invoked to handle it.
> > Andy Kramek
>
> Oops! Two little hitches in the gitalong here. How do you stop the messages that the Registry wants to force upon you? Like, "Are you sure you want to update this information into the Registry?" and "Information in xyz.reg has been successfully entered into the Registry" messageboxes.
>
> Perhaps the problem is in my ShellExecute request? I am using:
>
> lnReturn = ShellExecute(0,"open",lcRegFile,"","",1)
>
> where lcRegFile is the full path and file name of the .reg file.
>
> Everything else in this app is going great guns, and I am excited at what VFP has going for it now in version 9 (I left off at version 5 for a few years).
>
> Randy L. Smith
> Saphea, Inc.
>
www.saphea.comREGEDIT takes a "/s" parameter to run in silent mode. You could try passing that as a parameter in the Shellexecute call. I confess I have never worried about trying to suppress the messages, but if you really must do it silently you could always call RegEdit directly:
RUN regedit /s 'F:\DRIPS\SQL_Scripts\CCSRemote.reg' /n
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA