Page 1 of 1

[SOLVED] Date - registry

Published: January 3, 2019 - 3:35 PM
by gillesr13
Good morning,
I'm a complete newbie on Wapt, so please excuse my question...;-)
How do you write today's date to the registry?
I wrote this line, but it's a KO

Code: Select all

registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\APPLILOC\FireFox ESR Portable', 'InstallDate' , datetime, type=REG_SZ)
I tried to add:

Code: Select all

import datetime
date = datetime.date.now()
str(date)
Thank you in advance to everyone who is willing to help me!
Gilles

Re: Date - registry

Published: January 10, 2019 - 6:03 PM
by htouvet

Code: Select all

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)