Jump to content


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.
Photo

In Modify feature size is not shown correct


2 replies to this topic

vikasagg

vikasagg
  • Members
  • 13 posts

Posted 25 January 2005 - 17:19

Hi All!,

I am using InstallShield Express 10.0 and creating a InstallscriptMsi Project,

When setup is run Maintenance mode if i choose Modify option the the feature tree shows the feature but the size of that feature is shown as 0.0 MB ,
Donot know why is it so, if i am missing something


thanks in advance

Vikas Aggarwal
huh.gif

jrcoldinmn

jrcoldinmn
  • Members
  • 16 posts

Posted 25 January 2005 - 19:41

I was having a similar problem when removing the application using add/remove software, the size was reported a 0.0MB. If memory serves, the property ARPINSTALLLOCATION must have a value pointing to the installation location for add/remove to interogate the size of the application. Since I don't permit the end user from changing the install location, I entered a value manually in the Property Manager view. But this information from the InstallShield Developer Tip: http://www.installsh...iPropUninst.asp
might provide a better method of resolution:

One aspect of Windows Installer's behavior that is occasionally surprising to developers is that the values of MSI properties set during installation are generally not available during maintenance mode or uninstallation. This article describes different approaches to saving MSI property values to make them available after the initial installation.

The value of the predefined property ARPINSTALLLOCATION, which is intended to represent the main installation directory for a product, is automatically written to the target system, and available later using MsiGetProductInfo or ProductInfo. However, by default this property does not have a value. To write the value of INSTALLDIR to the registry so that it can be read during a maintenance operation, you can create a set-a-property custom action that sets ARPINSTALLLOCATION to [INSTALLDIR], adding the custom action to the Execute sequence after CostFinalize, with condition Not Installed. After doing so, you can read the value of INSTALLDIR during a maintenance operation using a VBScript custom action (for example) as follows:

str = Installer.ProductInfo(Property("ProductCode"), "InstallLocation")


Go to the link above for the full article and more information.

JR

vikasagg

vikasagg
  • Members
  • 13 posts

Posted 26 January 2005 - 13:15

Hi!
I have check that also, as i am using installshield Express 10.0, there is already custom action for setting ARPINSTALLLOCATION to installdir,

Even during maintenance mode value of INSTALLDIR is also available but after passing INSTALLDIR to sdfeaturetree it is still showing feature size as 0.00MB,
Value of INSTALLDIR and INSTALLLOCATION obtained is same, i have tested by changing INSTALLDIR to a differenct location other than default one.

I have tried to get feature size in Maintenance mode through
nResult = FeatureTotalSize ( MEDIA , "" , TRUE , TRUE );
nResult = NumToStr(sData,nResult);
MessageBox(sData,INFORMATION);

It is giving me size but when i call sdFeatureTree then it is showing as 0.0MB.

nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, "", 2);

One more thing if i upgrade the setup then the value of INSTALLLOCATION string in registry \\Uninstall\ProductCode becomes blank, No idea why it is happening huh.gif

Any Idea!