My program will read value from registry and use it as the TARGETDIR of my installer. The problem is if the registry doesn't exist or contain empty value, the installer won't even start. It will show an error message "could not access network location ...". Is there any way to determine the existance of the registry? If the registry doens't exist, then I will use a default location for the TARGETDIR.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Installer failed if AppSearch can't find Registry
Started by
ClydeMontreal
, Aug 11 2003 15:12
4 replies to this topic
Posted 12 August 2003 - 11:50
Could you maybe set the value as a default of TARGETDIR or something like that and then use the AppSearch table to change it. Then if AppSearch cant find the value, the installer should continue with the default value.
Posted 12 August 2003 - 19:21
Luke, thanks for reply. The problem is not about the default value of TARGETDIR. The problem is the installer won't able to start if the registry indicated in RegLocator doesn't exist. I use AppSearch and RegLocator to retrieve a path from previous install and use this path as TARGETDIR. It works well if the registry exist, but if the registry is not found, the installer will show me an error message and terminate it self.
Posted 12 August 2003 - 19:51
That's because in this case your TARGETDIR points to an invalid location. Therefore Luke suggests that you set a default value for TARGETDIR in your directory table, and abort the installation with a meaningful error message if the registry entry isn't found. Alternatively you can continue your setup with the default value, but of course in this case you cannot use TARGETDIR in your AppSearch as this would set TARGETDIR to something invalid. Instead use a different property, e.g. FOUNDTARGETDIR, and use a custom action to set TARGETDIR = FOUNDTARGETDIR only if FOUNDTARGETDIR is not empty.
Stefan Krüger
InstallSite.org twitter facebook
Posted 12 August 2003 - 20:36
Thank you Stefan and Luke. I fixed my problem. I am really appreciated for your help.