Página 1 de 1

[RESUELTO] Fecha - registro

Publicado: 3 de enero de 2019 - 15:35
por gillesr13
Buen día,
Soy un completo novato en Wapt, así que disculpe mi pregunta...;-)
¿Cómo se escribe la fecha de hoy en el registro?
Escribí esta línea, pero es un KO

Código: Seleccionar todo

registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\APPLILOC\FireFox ESR Portable', 'InstallDate' , datetime, type=REG_SZ)
Intenté agregar:

Código: Seleccionar todo

import datetime
date = datetime.date.now()
str(date)
¡Gracias de antemano a todos los que estén dispuestos a ayudarme!
Gilles

Re: Fecha - registro

Publicado: 10 de enero de 2019 - 18:03
por htouvet

Código: Seleccionar todo

from setuphelpers import *
import time

def install():
    registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\APPLILOC\FireFox ESR Portable', 'InstallDate' ,  time.strftime('%Y%m%d') , type=REG_SZ)