InstallShield und AdminStudio Schulungen Original-Kurse mit Zertifikat Hier klicken


InstallSite MSI FAQ Home Introduction Preparing Creating How To Runtime Issues Error Reference Deutsch MSI FAQ in Deutsch

Why does my call to MsiGetProperty fail?

If your call to MsiGetProperty returns ERROR_MORE_DATA (and the data buffer you passed in returns empty), the usual mistake is not having passed in an initial buffer size in the last argument to MsiGetProperty; in C or InstallScript, a typical call might look like this:

// Set initial buffer size
nBuffer = MAX_PATH + 1;

// Get property
// Note: in C you would have to write &nBuffer
MsiGetProperty(hInstall, "INSTALLDIR", svPropertyValue, nBuffer); 

Other things to check:

If you set the value of your property in the User Interface sequence and you're trying to read the value in the Execute sequence, make sure you're using a public property (one whose name contains only uppercase letters); during the jump from the UI to the Execute sequence, private properties (whose names contain at least one lowercase letter) are reset.

If you're trying to read the property value during deferred execution (in the Execute sequence), you'll have to pass your property value through the CustomActionData property. See InstallShield KB article Q104413 (at http://support.installshield.com/kb) for details. (In InstallShield Developer 7 it is not required to use this workaround.)



English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
GERMAN Impressum,Datenschutzerklärung, Haftungsausschluss
By using this site you agree to the license agreement. Webmaster contact.