Check registry fails on Windows 7 x64
Check registry fails on Windows 7 x64
I try to locate an old installshield installation of my application by checking a registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
This works fine on Windows 7 32 bit, but it returns NO$KEY in x64.
When I open regedit on the x64 windows 7 I see the entry exists.
I set my installation to x64 installation mode.
How can I access the key correctly in x64?
Alexander
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
This works fine on Windows 7 32 bit, but it returns NO$KEY in x64.
When I open regedit on the x64 windows 7 I see the entry exists.
I set my installation to x64 installation mode.
How can I access the key correctly in x64?
Alexander
Re: Check registry fails on Windows 7 x64
What version of InstallAware are you using?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
I'm using version InstallAware Studio 10.
Re: Check registry fails on Windows 7 x64
If your product is 32-bit software, you should keep your installer in 32-bit mode.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
should appear as:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
in Win7 x64...
This redirection is automatically made for you if you leave your installer in 32-bit mode.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
should appear as:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
in Win7 x64...
This redirection is automatically made for you if you leave your installer in 32-bit mode.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
I tried this registry path also, with the installer in 32 bit mode.
It is not working. Check registry returns NO$KEY.
What puzzles me is the fact that the path exists when I look at it with regedit.exe ...
It is not working. Check registry returns NO$KEY.
What puzzles me is the fact that the path exists when I look at it with regedit.exe ...
Re: Check registry fails on Windows 7 x64
So, in x64, the actual key appears at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
And not in the Wow6432Node?
If that's the case, then it should be read in 64-bit mode.
Perhaps, could you try to write a test value to that location and try to read it back or see where it appears in regedit?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
And not in the Wow6432Node?
If that's the case, then it should be read in 64-bit mode.
Perhaps, could you try to write a test value to that location and try to read it back or see where it appears in regedit?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
Yes, that's right.
The registry-entry I want to check comes from an installshield installation which was made in x64 mode. But the origin of the entry should not be of any importance.
I did your proposed test and wrote a reg value.
When I write a registry value with installaware in x64 mode to the same path, it is redirected to the Wow6432Node. (Why? I'm in x64 mode ...)
So it seems that installaware has a problem with reading the registry values on a 64 bit machine. Where else should the entry be if not in the given two paths("normal" and Wow6432Node) ?
I do my tests on a VMware virtual machine.
The registry-entry I want to check comes from an installshield installation which was made in x64 mode. But the origin of the entry should not be of any importance.
I did your proposed test and wrote a reg value.
When I write a registry value with installaware in x64 mode to the same path, it is redirected to the Wow6432Node. (Why? I'm in x64 mode ...)
So it seems that installaware has a problem with reading the registry values on a 64 bit machine. Where else should the entry be if not in the given two paths("normal" and Wow6432Node) ?
I do my tests on a VMware virtual machine.
Re: Check registry fails on Windows 7 x64
It seems to work fine for me.
How are you creating the project?
I'm attaching a test project I created. This was created in IA 10 and it uses the Native Setup template.
I added this to line 2:
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Then, during install, I made changes to write to registry, then read it and display:
Comment: Install/Re-Install product
Write Registry Key HKLM\SOFTWARE\test\test, testData
Create Shortcut $SHORTCUTFOLDER$\Uninstall #TITLE# to $UNINSTALLLINK$
[OFFLINE CONTENT]
[DEFINE WEB MEDIA regTest]
Get Component regTest Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
end
Comment: TO-DO: Insert any additional install commands here
[compiler if Variable BUILDMODE Equals PATCH]
Apply Patch (get result into variable SUCCESS)
[compiler else]
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
Read Registry Key HKLM\SOFTWARE\test\test into regTest
MessageBox: regTest, Read Registry Key HKLM\SOFTWARE\test\test$NEWLINE$$NEWLINE$Result:$NEWLINE$$regTest$
end
The project is attached for you to test/examine...
How are you creating the project?
I'm attaching a test project I created. This was created in IA 10 and it uses the Native Setup template.
I added this to line 2:
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Then, during install, I made changes to write to registry, then read it and display:
Comment: Install/Re-Install product
Write Registry Key HKLM\SOFTWARE\test\test, testData
Create Shortcut $SHORTCUTFOLDER$\Uninstall #TITLE# to $UNINSTALLLINK$
[OFFLINE CONTENT]
[DEFINE WEB MEDIA regTest]
Get Component regTest Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
end
Comment: TO-DO: Insert any additional install commands here
[compiler if Variable BUILDMODE Equals PATCH]
Apply Patch (get result into variable SUCCESS)
[compiler else]
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
Read Registry Key HKLM\SOFTWARE\test\test into regTest
MessageBox: regTest, Read Registry Key HKLM\SOFTWARE\test\test$NEWLINE$$NEWLINE$Result:$NEWLINE$$regTest$
end
The project is attached for you to test/examine...
- Attachments
-
- regTest.7z
- (196.53 KiB) Downloaded 954 times
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
I created my project by using the installshield converter, and then making the necessary changes by hand.
I tried your test and it works fine for me also.
What you did in your test installation is the same I did in my installation. But it is not working within mine.
When checking my registry key path from your test project, this also works. So, in general check/read registry works.
I suppose it is something within the logic of the installation engine which causes the check/read registry to fail within my installation, which does some other things also.
I had a similar problem with USB drivers I want to install in 32 bit or 64 bit version (my installation is intended as a hybrid installation for 32 and 64 bit), which I install conditionally depending on the platform (32 or 64 bit)
The drivers did not install for both platforms, so I had to create separate installations for the drivers only, which I call silently from within my main installation...
I tried your test and it works fine for me also.
What you did in your test installation is the same I did in my installation. But it is not working within mine.
When checking my registry key path from your test project, this also works. So, in general check/read registry works.
I suppose it is something within the logic of the installation engine which causes the check/read registry to fail within my installation, which does some other things also.
I had a similar problem with USB drivers I want to install in 32 bit or 64 bit version (my installation is intended as a hybrid installation for 32 and 64 bit), which I install conditionally depending on the platform (32 or 64 bit)
The drivers did not install for both platforms, so I had to create separate installations for the drivers only, which I call silently from within my main installation...
Re: Check registry fails on Windows 7 x64
So, any more ideas or am I stuck with this problem here?
Re: Check registry fails on Windows 7 x64
We need more info to determine what the problem could be.
In the problem project, are you seeing multiple registry checks fail or only one?
Some insight into how your are separating the 32 and 64 bit portions of your installer could be helpful.
In the problem project, are you seeing multiple registry checks fail or only one?
Some insight into how your are separating the 32 and 64 bit portions of your installer could be helpful.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
I'm posting my script code so you can take a look at it.
- Attachments
-
- ExPresso.mia.zip
- (27.59 KiB) Downloaded 898 times
Re: Check registry fails on Windows 7 x64
Code: Select all
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Check Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Write Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName, Test (permanent)
Check Registry Key HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
MessageBox: , $OLDINSTALLATION$
if Variable OLDINSTALLATION Contains ExPresso
Display Dialog: OldInstallationDetected, wait for dialog to return (modal)
Terminate Installation
end
A couple things worth pointing out... The purple commands (write registry) will not be applied until Apply Install (although the write/reads above don't match, I just wanted to make sure that's known).
You would probably want to put the above code ahead of the pre-requisite section or what you could happen is, if one of the pre-requisites was not installed for whatever reason and then it was attempted to install this version (and the old one still existed), it would force you to install the pre-requisite(s) before being told the old version already exists.
Otherwise, it looks like you're trying to check for:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
If I manually set that key in the registry (not in Wow6432Node) and modified your script to look like (same section):
Code: Select all
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Check Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
MessageBox: , $OLDINSTALLATION$
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Write Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName, Test (permanent)
Check Registry Key HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
MessageBox: , $OLDINSTALLATION$
The first messagebox displays the correct DisplayName, the second displays No$key.
I'm not sure if this helps you at all, but if not, it could help to clarify the problem definition; what you're trying to do (code), what is the expected behavior and what is actual.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Check registry fails on Windows 7 x64
Actually, my code looks like this (in your post the out-commented lines were displayed as active lines):
So right, what I'm trying to do is checking for the existance of this registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
But it is not working on my side, even if i create the registry entry manually, like you did.
Code: Select all
Comment: Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Comment: Check Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
Comment: Write Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName, Test (permanent)
Comment: Check Registry Key HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName into OLDINSTALLATION
MessageBox: , $OLDINSTALLATION$
if Variable OLDINSTALLATION Contains ExPresso
Display Dialog: OldInstallationDetected, wait for dialog to return (modal)
Terminate Installation
end
So right, what I'm trying to do is checking for the existance of this registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7548C7BF-0B5E-4E3D-BE0F-DA08DE023EF9}\DisplayName
But it is not working on my side, even if i create the registry entry manually, like you did.
Re: Check registry fails on Windows 7 x64
Is your setup in 32 or 64 bit mode at the time of that check you run?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Who is online
Users browsing this forum: No registered users and 29 guests