在"自定义操作"中安装项目的CustomActionData属性中填入:/targetdir="[TARGETDIR]\"然后安装项目(installer类的继承类)中,就可以用string InstallDir=this.Context.Parameters["targetdir"];来访问用选择的安装目录 相关文章: