Creation/Replacing of registry key during uninstal
Posted 31 October 2007 - 09:03
I have problem with a registry key replacing.
PREHISTORY.
We have two installed versions of product "AppSpecific" (1.0 and 2.0).
The product installation sets some keys in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\AppSpecific\1.0
and
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\AppSpecific\2.0
Also have common key for active version (last installed):
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\AppSpecific\Exec\AppSpecific
the key has value: "Active"= "2.0"
The key and value is used by another application for some aim (console running for example).
So, user try to uninstall 2.0 (active version) and I must to scan all installed versions, ask user (per AskOptions dialog) about version of the application which he wants to use for connection with another application.
Then change HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\AppSpecific\Exec\AppSpecific:
"Active"= "2.0" to "Active"= "1.0"
I can change it but the uninstallation removes the key.
How I can exclude the key removing?
PS. the key is created by installation of the application
Thank you.
Posted 31 October 2007 - 10:08
how I can create a registry key which cannot be deleted during uninstallation.
Posted 31 October 2007 - 10:15
Stefan Krüger
InstallSite.org twitter facebook
Posted 31 October 2007 - 10:20
I know where the Registry Flags can be set,
but how I can do it in script
Posted 31 October 2007 - 11:20
Stefan Krüger
InstallSite.org twitter facebook
Posted 01 November 2007 - 05:32
I try to create the key and value whereby UI:
- Create a key. Now I CAN change the flag:
1. Install Only (+) [my need]
2. UnInstall entire key(-)
3. Install if absent, uninstall if present (*)
- try to add string value. The flag is discarded and
now I can set the flag 2 or 3 ONLY
(see attached bitmaps)
Is it bug or my mistake?
Posted 01 November 2007 - 08:46
I cannot understand how the flags is working??
First, why/when one of the flags is disabled
Second, I tried to set "Install Only" , no expected result....
Please help
Posted 01 November 2007 - 08:56
How?
Posted 01 November 2007 - 11:10
Stefan Krüger
InstallSite.org twitter facebook
Posted 02 November 2007 - 04:48
- InstallShield "InstallScript MSI" Projects
- InstallShield "Basic MSI" Projects
Stefan, which topic is apropriate for my question?
once again, big sorry
Posted 02 November 2007 - 13:26
Stefan Krüger
InstallSite.org twitter facebook
Posted 06 November 2007 - 09:55
I use the msm file for building of full CD for all my products.
Basic MSI Project is using for creation installation (+ prerequisites, custom actions etc)
in the largest accounts I would add all the registry transformation to msm module
is it possible? or only in MSI project
Posted 06 November 2007 - 11:59
Stefan Krüger
InstallSite.org twitter facebook
Posted 06 November 2007 - 12:03
Stefan Krüger
InstallSite.org twitter facebook
Posted 08 November 2007 - 04:54
>registry *entry* (value), not a shared key (folder symbol in RegEdit), right?
Confusing for me....
My msm project contains all required keys and values.
I added custom action (script) to MSI project which scans the registry,
raise ASKOptionDlg and ask user about active version after uninstallation,
then the script change value for specific key to selected by user.
I debug the script and it is working during uninstallation,
but after the process the key is removed all the same.
So I would keep the key (with changed value) after uninstallation.
What I need to do?
Posted 10 November 2007 - 12:38
[The key]
The entry = The value
So if your entry is shared, even with different values (I think), it should be properly refcounted if the component GUID is identical. Please double check the log to see what Windows Istaller has to say about this component.
Stefan Krüger
InstallSite.org twitter facebook
Posted 12 November 2007 - 08:54
Just small specifics of my installation:
Firstly I create MSM file. The file contains some components.
One of the components has keys (see "InstallComp.png")
I must to keep the entry ("CurrentVersion") but change its value (one of versions which still are installed)
Second
Then I add the msm file to MSI project as merge module ("MSIMerge.png")
Also I added custom action to the MSI project (scanning of the registry, user asking and modification of the entry value)
So, what and how I need to specify for the entry in msm project?
Sorry for my flusters.
Posted 13 November 2007 - 08:56
BTW I wonder why you're not using the full InstallShield 12 IDE user interface but instead use the ancient "InstallShield for Windows Installer 2.x" view style.
Stefan Krüger
InstallSite.org twitter facebook
Posted 20 November 2007 - 08:01
(originally the progects was created by special program and I only modified
some components, attributes ....)
I'll add the registry keys (and entry+value with required flags) in msm project
then add custom action (script) in msi project for the values modification.
Stefan is it correct way?
>BTW I wonder why you're not using the full InstallShield 12 IDE
>user interface but instead use the ancient "InstallShield for
>Windows Installer 2.x" view style.
how I can change the UI style?
Edited by SinDos, 20 November 2007 - 08:02.
Posted 20 November 2007 - 10:05
The keys have "Install Only" flag
The keys are created during installing but removed after uninstalling.
Stefan may be it is bug in the software?
I have not idea what I do wrongly!
I'll try one more way:
I'll remove the keys from msm project
and try to create it by custom action (script) for installation stage and
another script for the keys modification during uninstallation
Posted 23 November 2007 - 01:11
You can change the InstalShield IDE layout in Tools > Options.
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 November 2007 - 19:14
I have had similar problem long time ago (with an InstallShield Script project), apparently InstallShield logs all the registry creations in the script so it can remove them during un-install (and this was exactly what I DID NOT want to happen).
You may disable the logging using:
Disable(LOGGING);
////Create/Modify registry
Enable(LOGGING);
I am not sure if this would help your case but your symptoms sound familiar to me, anyway it's worth a try.
Regards,
M. Nouryan
Posted 27 November 2007 - 22:36
Add a string value without a name to the registry key - the value will be named "(Default value)". After doing so the third option should be available. Note: the data in this value is not important.
Background: the special collaboration between the columns Name and Value in the registry table. See http://msdn2.microso...y/aa371168.aspx
Edited by Zweitze, 27 November 2007 - 22:39.
Posted 18 September 2008 - 10:33
I have two problems
1.)Components marked SHARED by an installer have registry entries left behind in the windows registry when a product is uninstalled. Is there a way to force the deletion of these components on uninstall?
2.)We have a customer that wants to run a silent install of our msi. However, they want an exit code broadcast once the installer is finished installing successfully or if it fails. Is there a way to do this other than by using the log file?
Please suggest me the solutions.
Thanks
Posted 18 September 2008 - 11:01
2. msiexec does return values for success, failure or user exit.
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 September 2008 - 11:47
1)
Files are removing after uninstallation but registry entries are present.They are HKLM Registry entries.its not clean image.
2)How does i incorpoate in my msi because it is a silent installation.after successfull installation/failed installation it broadcast exit code.
Posted 18 September 2008 - 11:52
msiexec.exe /i your.msi /q
will return 0 for success (if no reboot is required) or any of the error codes documented in MSI Help in case of failure or if a reboot is required (like 1603 for error, 1602 if user aborted the install).
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 September 2008 - 12:01
For exit code broadcast i used Qn+ switch for installation it is working.