Escribir un valor en el registro de windows

01/03/2004 - 19:31 por Luis Gerardo Carrillo Herrera | Informe spam
Hola amigos, anduve buscando por el foro una rutina para la lectura del
registro de windws, si mal no recuerdo Luis Ma.
(http://www.portalfox.com/modules.ph...amp;sid322) publico un articulo en portalfox en la cual mediante una llamada a la
API, se leia el registro, hasta aqui todo bien.

Mi problema es que no encuentro algo similar para guardar algun valor en el
registro.

Ya he visto otros articulos que han publicado aqui y no los entiendo... :(


__________________________
Luis Gerardo
Torreón, Coah.
México
lg_carrillo[NOSPAM]@hotmail.com
__________________________
 

Leer las respuestas

#1 David Amador \(Davphantom\)
02/03/2004 - 04:38 | Informe spam
Puedes hacerlo de varias formas : clase registry, API, WSH ...

Con WSH

WScr=CreateObject("WSCript.Shell")
wscr.RegWrite("HKEY_CURRENT_USER\Software\Mi Sistema\Usuario",
"Administrador") &&Escribir
wscr.RegRead("HKEY_CURRENT_USER\Software\Mi Sistema\Usuario") &&
leer
Wscr.RegDelete("HKEY_CURRENT_USER\Software\Mi Sistema\Usuario")
&&Borrar

**************************************************
Aquí estan algunos links que te explican como almacenar en el registro los
diferentes tipos de datos...

HOWTO: Read from the Windows Registry
http://support.microsoft.com/defaul...-us;140170

HOWTO: Write to the Windows Registry Using API Calls
http://support.microsoft.com/defaul...-us;135398

HOWTO: Programmatically Access the Registry in Visual FoxPro
http://support.microsoft.com/defaul...-us;191638

HOWTO: Use the Windows Script Host to Read, Write, and Delete Registry Keys
http://support.microsoft.com/defaul...-us;244675

HOWTO: Read a REG_SZ Value From the Registry
http://support.microsoft.com/defaul...us;Q258556

HOWTO: Read a REG_EXPAND_SZ Value From the Registry
http://support.microsoft.com/defaul...us;Q265331

HOWTO: Read a REG_MULTI_SZ From the Registry
http://support.microsoft.com/defaul...us;Q258528

HOWTO: Write a DWORD to the Registry
http://support.microsoft.com/defaul...us;Q258262

HOWTO: Write a REG_SZ Value to the Registry
http://support.microsoft.com/defaul...us;Q258559

HOWTO: Write a REG_EXPAND_SZ to the Registry
http://support.microsoft.com/defaul...us;Q271733

HOWTO: Write a REG_MULTI_SZ Value to the Registry
http://support.microsoft.com/defaul...us;Q258545

David Amador Tapia
WebMaster de La Web de Davphantom
www.davphantom.net
Cartagena. Colombia
Tel. (5) 6581523 - 6621502 - Cel 310-6581865


"Luis Gerardo Carrillo Herrera" escribió en el
mensaje news:uaTFct7$
Hola amigos, anduve buscando por el foro una rutina para la lectura del
registro de windws, si mal no recuerdo Luis Ma.



(http://www.portalfox.com/modules.ph...mp;sid> 322) publico un articulo en portalfox en la cual mediante una llamada a la
API, se leia el registro, hasta aqui todo bien.

Mi problema es que no encuentro algo similar para guardar algun valor en


el
registro.

Ya he visto otros articulos que han publicado aqui y no los entiendo... :(


__________________________
Luis Gerardo
Torreón, Coah.
México
lg_carrillo[NOSPAM]@hotmail.com
__________________________


Preguntas similares