Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute Registry files from with VFP
Message
 
 
To
21/02/2006 15:26:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01097851
Message ID:
01098084
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform