DTF和MsiGetProperty [英] DTF and MsiGetProperty

查看:145
本文介绍了DTF和MsiGetProperty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与以下内容有关:访问InstallShield支持文件"来自DTF(托管的自定义操作)

我需要阅读属性 SUPPORTDIR .根据这个论坛( http://community.flexerasoftware.com/showthread .php?t = 180742& page = 3 ),我需要使用MsiGetProperty.

I need to read the property SUPPORTDIR. According to this forum (http://community.flexerasoftware.com/showthread.php?t=180742&page=3), I need to use MsiGetProperty.

如何从DTF调用MsiGetProperty?

How can I call MsiGetProperty from DTF?

推荐答案

DTF的Session类具有以下方法:

DTF's Session class has the method:

公共字符串this [string属性]获取:设​​置:

public string this[string property] get: set:

这将转移到非托管C ++端,在此它们调用MsiGetProperty和MsiSetProperty.有点像VBScript Session.Property("SUPPORTDIR")一样简单.

This gets remoted over to the unmanaged C++ side where they invoke MsiGetProperty and MsiSetProperty. It's kind of like VBScript Session.Property("SUPPORTDIR") only simpler.

InstallShield应该已经计划了一个名为ISSetupFilesExtract的自定义操作.记录您的安装,并查看其是否正在执行并为该属性分配路径.

InstallShield should have scheduled a custom action called ISSetupFilesExtract. Log your install and see if it's executing and assigning the path to the property.

我能想到的唯一其他难题是,如果您正在做一个正确的UAC故事,即不提升UI,然后提升Execute序列,请确保SecureCustomProperties属性中列出了SUPPORTDIR.仅将在UI序列中获得值的安全"属性转移到执行序列. "PUBLIC"属性将默认恢复为安装程序开始执行时的状态.

The only other gotcha I can think of is if you are doing a proper UAC story of non-elevating your UI but then elevating your Execute sequence, make sure that SUPPORTDIR is listed in the SecureCustomProperties property. Only "Secure" properties that get a value in the UI sequence are carried over to the execute sequence. "PUBLIC" properties will default back to whatever then were when the installer started executing.

我可以告诉您,我在DTF自定义操作中使用了SUPPORTDIR(有时直接使用,有时通过CustomActionData序列化),但没有任何问题.

I can tell you that I use SUPPORTDIR ( sometimes directly and sometimes via CustomActionData serialization) in my DTF custom actions and I have no problems with it.

这篇关于DTF和MsiGetProperty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆