> > This should be called from your application start-up to copy a new file to the local machine. You then need to add a call to something to update the driver and then call an "Update Driver" function with the Path/Filename. This function can use the windows API call, ShellExecute, to run the .Reg file like this:
>
> Andy,
>
> What you have posted here looks super! Thank you! But -- (and I'm stealing this from one of Marcia's past Advisor columns) -- I must have taken my stupid pills this morning. Are you saying you simply execute the .REG file? You don't need to execute some EXE or COM function with the REG file as a parameter?
>
> UPDATE: Well, isn't it interesting what a little Googling will turn up? Found the answer, Andy. Anyone reading this who also wants the answer can visit these links:
>
> 1.
http://www.computerperformance.co.uk/Registry/registry_hacks_reg.htm#Display%20ComputerName.
> 2.
http://www.computerperformance.co.uk/Registry/registry_5stages.htm> 3.
http://www.windowsnetworking.com/nt/registry/regfiles.shtml>
> Randy L. Smith
> Saphea, Inc.
>
www.saphea.comAs 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.
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA