如何在Inno Setup中进行安装之前更改defaultdirname参数? [英] How to change defaultdirname parameter just before Install in Inno Setup?
问题描述
我想更改ssInstall部分中的defaultdirname参数.我怎样才能做到这一点?是否有用于设置[设置]参数的功能.
I want to change defaultdirname parameter in ssInstall part. How can I do that? Is there a function for setting [Setup] parameters.
推荐答案
以下全局对象可用: 类型为TMainForm的MainForm,类型为TWizardForm的WizardForm和类型为TUninstallProgressForm的UninstallProgressForm,以及一个特殊的常量:类型为TControl.Cursor的crHand.
The following global objects are available : MainForm of type TMainForm, WizardForm of type TWizardForm and UninstallProgressForm of type TUninstallProgressForm and one special constant: crHand of type TControl.Cursor.
如果要在向导中设置默认目录,只需像使用普通delphi代码一样访问它的组件即可.
If you want to set the default directory in the wizard, just access to it's componants like you would in normal delphi code.
例如,将目录设置为自定义值:
For example, set the directory to a custom value:
WizardForm.DirEdit.Text := 'c:\test';
要读取该值,可以使用WizardDirValue函数.
to read that value you can use the WizardDirValue function.
我说可以访问" ...但是我花了一个小时才弄清楚;)
I say 'just access'... but it took me an hour to figure out ;)
这篇关于如何在Inno Setup中进行安装之前更改defaultdirname参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!