I coded the following in a prg, but it does not update my registry
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
RETURN ShellExecute(0,"regedit","c:\regkey.reg","","",1)
When I type the following in the Run Open it does update the registry.
regedit.exe /s c:\regkey.reg
FYI - I did see Sergey Berezniker posted code on updating and reading the registry, so I will try that next if I can not get this to work. But since I have a single key I always want to be a certain value, the ShellExecute would be nice.
>>How do you code the shellexecute()? I do not know the syntax.
>
>
DECLARE INTEGER ShellExecute ;
> IN SHELL32.DLL ;
> INTEGER nWinHandle,;
> STRING cOperation,;
> STRING cFileName,;
> STRING cParameters,;
> STRING cDirectory,;
> INTEGER nShowWindow
>RETURN ShellExecute(0,lcOperation,lcFilename,"",lcWorkDir,1)
>
>
>In your case,
>lcOperation="regedit"
>lcFilename= name of your reg file
>lcWorkDir= full path of the directory where the reg file is.
>
>Or you may just leave lcWorkDir empty and use a fullpath for the filename.