Setup Factory 10

MSI.OpenPackage

MSI.OpenPackage

This is the first topic This is the last topic  

MSI.OpenPackage

This is the first topic This is the last topic  

OverviewExamples

number MSI.OpenPackage (

string PackagePath )

Example 1

-- Get the package handle.

nPackageHandle = MSI.OpenPackage(_TempFolder.."\\Downloaded\\setup.msi");

 

if (nPackageHandle ) then

   strProperty = MSI.GetProductProperty(nPackageHandle, "SUFUSERPROFILE");

   if (strProperty) then

       -- Show a dialog with the feature info.

       Dialog.Message("Property", "Property value: "..strProperty);

   else

       -- An error occurred.

       nError = Application.GetLastError();

       Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);

   end

 

   -- Finished using the handle, so close it.

   if (not MSI.CloseHandle(nPackageHandle)) then

       Dialog.Message("Error", "Failed to close package handle.");

   end

else

   Dialog.Message("Error", "Failed to get package handle.");

end

Gets the product property "SUFUSERPROFILE" and shows its value in dialog message.

See also: Related Actions


Learn More: Indigo Rose Software - Setup Factory - Buy Now - Contact Us