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
CheckRegistry ... what i am doing wrong ?
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
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.
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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Re: CheckRegistry ... what i am doing wrong ?
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
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
Re: CheckRegistry ... what i am doing wrong ?
Carlos,
Could you pleasy try using quotes?
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
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
Who is online
Users browsing this forum: No registered users and 82 guests