CheckRegistry ... what i am doing wrong ?

Got a problem you cannot solve? Try here.
atg
Posts: 21
Joined: Fri Jan 04, 2008 10:35 am

CheckRegistry ... what i am doing wrong ?

Postby atg » Wed Jan 09, 2008 12:08 pm

Existing Registry Key:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\Amyuni Document Converter 2.51]
"Configuration File"="acpdfui251.dll"
"Data File"="acfpdf.txt"
"Driver"="acpdf251.dll"
"Help File"=""
"Monitor"=""
"Datatype"=""
"Dependent Files"=hex(7):00,00,90,90
"Previous Names"=hex(7):00,00,90,90
"Version"=dword:00000003
"TempDir"=dword:00000000
"Attributes"=dword:00000002
"Manufacturer"=""
"OEM URL"=""
"HardwareID"=""
"Provider"=""
"DriverDate"=hex:00,00,00,00,00,00,00,00
"DriverVersion"=hex:00,00,00,00,00,00,00,00

Snip of MSIcode from InstallAwareDeveloper7
What i am trying to do is to check if this key NOT exists, run additional instalation, otherwise skip it:

Set Variable AMYUNI to
Check Registry Key HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\Amyuni Document Converter 2.51\\Driver\\ into AMYUNI

if Variable AMYUNI Equals UNKNOWN$TYPE
MessageBox: .., The value exists, but is of an unknown type
end
if Variable AMYUNI Equals BINARY$VALUE
MessageBox: .., The value exists, but is a binary type that cannot be read with this command.
end
if Variable AMYUNI Equals NO$VALUE
MessageBox: .., The specified key exists, but the specified value does not exist
end
if Variable AMYUNI Equals NO$KEY
MessageBox: .., The specified key does not exist
end
if Variable AMYUNI Equals READ$ERROR
MessageBox: .., An error occured during the read operation (check access privileges).
end
if Variable AMYUNI Equals acpdf251.dll
MessageBox: .., already
else
Run Program $TARGETDIR$\\install.exe "Printer" -n"Company Name" -s (WAIT)
end


I am always getting *The specified key does not exist* even when the key is there.

Any help will be greatly appreciated

Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Postby Alex_Ronquillo » Wed Jan 09, 2008 3:27 pm

I might know what your problem is:

In the Check Registry window, you are setting the Key field to:

SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\Amyuni Document Converter 2.51\\Driver

and the Value field empty. So your Check Registry command is actually checking for the existence of the default value of Registry Key:

HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\Amyuni Document Converter 2.51\\DriverTo solve this, just write into Key field:

SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\Amyuni Document Converter 2.51

and Driver in the Value field.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

carlos
Posts: 6
Joined: Tue Sep 13, 2011 2:45 pm

Re: CheckRegistry ... what i am doing wrong ?

Postby carlos » Fri Feb 10, 2012 11:24 am

Hello,

I am having a very similar problem with Check Registry. I want to check for the existence of a key in the location HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and put the result into a variable. I am leaving the Value field in the Check Registry dialog empty so that if the key exists I should be receiving the default value which is NO$VALUE. I created a quick test installer that I can run repeatedly. I have been able to confirm that if the key I am testing for has no spaces, it returns the expected NO$VALUE, but if the key has spaces it returns NO$KEY. Therefore I must be having problems defining keys with spaces.

This returns NO$KEY even if the key is there:

~InstallAware Clipboard Data~
~Check Registry~
~{82770485-A981-401D-B2CB-5D1CE9B0E837}~
~BIOPDFWRITERINSTALLED~
~2~
~SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PDF Writer - bioPDF_is1~
~~

This returns NO$VALUE which is what I would expect.

~InstallAware Clipboard Data~
~Check Registry~
~{82770485-A981-401D-B2CB-5D1CE9B0E837}~
~BIOPDFWRITERINSTALLED~
~2~
~SOFTWARE\Microsoft\Windows\CurrentVersion\WIC~
~~


How do I deal with spaces in the key name?

Thanks

Carlos

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: CheckRegistry ... what i am doing wrong ?

Postby giaviv » Sat Feb 11, 2012 7:06 pm

Carlos,

Could you pleasy try using quotes?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 82 guests