Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sample code to delete registry keys.
Message
De
04/06/2002 11:49:15
 
 
À
04/06/2002 11:28:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00664517
Message ID:
00664546
Vues:
22
Andrus,
You could use the WSH:
owsh=CREATEOBJECT("wscript.shell")
owsh.RegDelete("KeyOrValueToDelete")
If the argument ends with a backslash, then it's treated as a key, otherwise as a value. I think you'll have to delete each key individually.

Use at your own risk ;-)

>I have the folowing key in registry:
>
>HKEY_CLASSES_ROOT\Installer\Products\D4630248E9E66D11E8F400008E6D868E
>
>This key contains 7 leaves: Client, Language, ProductName, Version etc.
>
>Is it possible to write VFP 7 code to remove this key and all its leaves ?
>
>Is it possible to use a singe command to remove a key with all leaves or
>must I remove all subkeys reparately ?
>
>Here are the all keys which I want to remove:
>
>
>REGEDIT4
>
>[HKEY_CLASSES_ROOT\Installer\Products\D4630248E9E66D11E8F400008E6D868E]
>"ProductName"="My Application.msi"
>"PackageCode"="C1730248E9E66D11E8F400008E6D868E"
>"Language"=dword:00000409
>"Version"=dword:00000000
>"Assignment"=dword:00000001
>"AdvertiseFlags"=dword:00000184
>"Clients"=hex(7):3a,00,00
>
>[HKEY_CLASSES_ROOT\Installer\Products\D4630248E9E66D11E8F400008E6D868E\SourceList]
>"PackageName"="My Application.msi"
>"LastUsedSource"=hex(2):6e,3b,31,3b,43,3a,5c,57,49,4e,44,39,38,5c,54,45,4d,50,\
>  5c,5f,69,73,33,31,36,33,5c,00
>
>[HKEY_CLASSES_ROOT\Installer\Products\D4630248E9E66D11E8F400008E6D868E\SourceList\Net]
>"1"=hex(2):43,3a,5c,57,49,4e,44,39,38,5c,54,45,4d,50,5c,5f,69,73,33,31,36,33,\
>  5c,00
>
>[HKEY_CLASSES_ROOT\Installer\Products\D4630248E9E66D11E8F400008E6D868E\SourceList\Media]
>"DiskPrompt"="[1]"
>"1"="DISK1;1"
>
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform