Hello,
I am trying to search through the registry for an uninstall string of a specific program and it works flawless in Win 7 64 bit but the same process fails to read the UninstallString in 32 bit.
What is going wrong?
Read Registry doesn't work in Win 7 32 bit
Read Registry doesn't work in Win 7 32 bit
Manfred Wilner
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Read Registry doesn't work in Win 7 32 bit
Dear Manfred,
can you try to describe your steps?
Also, are you referring to an 32bit registry entry with a x64 OS target?
Regards
can you try to describe your steps?
Also, are you referring to an 32bit registry entry with a x64 OS target?
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Read Registry doesn't work in Win 7 32 bit
The registry key is Software\Microsoft\Windows\CurrentVersion\Uninstall and is the same on a x64 system and a x32 system.
The Key Publisher is getting read properly in both systems but UninstallString is not.
Here is the code snippet:
if Variable ISWIN7 Equals TRUE
Set Variable UNINSTALLKEY to Software\Microsoft\Windows\CurrentVersion\Uninstall
Set Variable UNINSTALLKEYS to
Set Variable UNINSTALLSTRING to
Set Variable FIRSTKEY to
Set Variable PUBLISHER to
Set Variable PROGRAM to
Find All Registry Keys in HKLM\$UNINSTALLKEY$ into UNINSTALLKEYS
Parse String $UNINSTALLKEYS$ into Variables FIRSTKEY and UNINSTALLKEYS (Split at first occurrence of pattern)
while Variable FIRSTKEY not Equals EMPTY loop
Read Registry Key HKLM\$UNINSTALLKEY$\$FIRSTKEY$\Publisher into PUBLISHER
if Variable PUBLISHER Equals Zebra
Read Registry Key HKLM\$UNINSTALKEY$\$FIRSTKEY$\UninstallString into UNINSTALLSTRING
Comment: MessageBox: Uninstall Driver, RegKey $FIRSTKEY$ Uninstall Str $UNINSTALLSTRING$
Parse String $UNINSTALLSTRING$ into Variables PROGRAM and UNINSTALLSTRING (Split at first occurrence of pattern)
Comment: MessageBox: Uninstall Driver, $PROGRAM$ /u $UNINSTALLSTRING$
Run Program $PROGRAM$ /u $UNINSTALLSTRING$ (WAIT, get result into variable SUCCESS)
Break out of Loop
end
Set Variable FIRSTKEY to
Parse String $UNINSTALLKEYS$ into Variables FIRSTKEY and UNINSTALLKEYS (Split at first occurrence of pattern)
wend
MessageBox: Uninstall Driver, Remeber to Uninstall the printer and driver with the Print Management Console.
else
...
end
The Key Publisher is getting read properly in both systems but UninstallString is not.
Here is the code snippet:
if Variable ISWIN7 Equals TRUE
Set Variable UNINSTALLKEY to Software\Microsoft\Windows\CurrentVersion\Uninstall
Set Variable UNINSTALLKEYS to
Set Variable UNINSTALLSTRING to
Set Variable FIRSTKEY to
Set Variable PUBLISHER to
Set Variable PROGRAM to
Find All Registry Keys in HKLM\$UNINSTALLKEY$ into UNINSTALLKEYS
Parse String $UNINSTALLKEYS$ into Variables FIRSTKEY and UNINSTALLKEYS (Split at first occurrence of pattern)
while Variable FIRSTKEY not Equals EMPTY loop
Read Registry Key HKLM\$UNINSTALLKEY$\$FIRSTKEY$\Publisher into PUBLISHER
if Variable PUBLISHER Equals Zebra
Read Registry Key HKLM\$UNINSTALKEY$\$FIRSTKEY$\UninstallString into UNINSTALLSTRING
Comment: MessageBox: Uninstall Driver, RegKey $FIRSTKEY$ Uninstall Str $UNINSTALLSTRING$
Parse String $UNINSTALLSTRING$ into Variables PROGRAM and UNINSTALLSTRING (Split at first occurrence of pattern)
Comment: MessageBox: Uninstall Driver, $PROGRAM$ /u $UNINSTALLSTRING$
Run Program $PROGRAM$ /u $UNINSTALLSTRING$ (WAIT, get result into variable SUCCESS)
Break out of Loop
end
Set Variable FIRSTKEY to
Parse String $UNINSTALLKEYS$ into Variables FIRSTKEY and UNINSTALLKEYS (Split at first occurrence of pattern)
wend
MessageBox: Uninstall Driver, Remeber to Uninstall the printer and driver with the Print Management Console.
else
...
end
Manfred Wilner
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Read Registry doesn't work in Win 7 32 bit
Dear Manfred,
I'm very sorry ... but I'm unable to replicate your issue and with my verifications the READ REGISTRY command works fine.
However, I haven't used the code you supplied because I can't manually re-enter your snippet (It should be posted as InstallAware Clipboard format).
Anyway, I have released a small sample to verify the READ REGISTRY command functionality.
The sample displays with a MessageBox its uninstall string once installed.
To test the project, just build it, install the package and then run the package once again.
It will return the current uninstall string of the package before with proceeding with the maintenance mode.
If you are able to replicate the same with a very minimal project, I'll be happy to verify it.
Hope this helps you.
Regards
I'm very sorry ... but I'm unable to replicate your issue and with my verifications the READ REGISTRY command works fine.
However, I haven't used the code you supplied because I can't manually re-enter your snippet (It should be posted as InstallAware Clipboard format).
Anyway, I have released a small sample to verify the READ REGISTRY command functionality.
The sample displays with a MessageBox its uninstall string once installed.
To test the project, just build it, install the package and then run the package once again.
It will return the current uninstall string of the package before with proceeding with the maintenance mode.
If you are able to replicate the same with a very minimal project, I'll be happy to verify it.
Hope this helps you.
Regards
- Attachments
-
- RegistryReadTest.rar
- (2.7 MiB) Downloaded 480 times
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 99 guests