Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute Registry files from with VFP
Message
 
 
À
21/02/2006 15:26:37
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01097851
Message ID:
01098084
Vues:
15
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform