I'm having a terrible time writing a registry key.
Here is the sequence:
Read Registry Key HKLM\\Software\\Quotes Plus\\Setup\\components\\Data\\Installed into INSTALLEDDATA
.
.
INSTALLEDDATA = $INSTALLEDDATA$ or 1
.
.
INSTALLEDDATA = $INSTALLEDDATA$ or 2
.
.
INSTALLEDDATA = $INSTALLEDDATA$ or 4
.
.
Everything works up to this point, the watch window shows a value of 7 for INSTALLEDDATA
I've tried both of these write statements, and nothing ever gets written to the registry.
Write Registry Key HKLM\\Software\\Quotes Plus\\Setup\\components\\Data\\Installed, INSTALLEDDATA
Write Registry Key HKLM\\Software\\Quotes Plus\\Setup\\components\\Data\\Installed, $INSTALLEDDATA$
INSTALLEDDATA is a DWORD in the registry. I've also tried a string, nothing ever gets written.
This key works fine:
Read Registry Key HKLM\\Software\\Quotes Plus\\Setup\\DataDir into DATADIR
.
.
The value is changed in a dialog box.
.
.
Write Registry Key HKLM\\SOFTWARE\\Quotes Plus\\Setup\\DataDir, $DATADIR$
I'm using the Ponderosa build, just downloaded from the web.
I've spent all day on this, and can't get any farther until I can write to the registry.
Gary Lyben
Write Registry Key
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Are you testing for writes after Apply Install executes?
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
It sounded to me like you are stepping through the debugger. Wait for Apply Install to execute - only then will your changes actually apply to the system, including writing to the registry.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
OK, I think I got it now, if the registry key didn't exist, the read returns a null string. Every subsequent operation on a null string silently fails.
If I check for the null, and set it to 0, then the code works as expected.
Thanks, everyone sure responded quickly on this, I'm impressed.
Best regards,
Gary Lyben
If I check for the null, and set it to 0, then the code works as expected.
Thanks, everyone sure responded quickly on this, I'm impressed.
Best regards,
Gary Lyben
Who is online
Users browsing this forum: No registered users and 27 guests