Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows Inno设置:创建自定义表单_Windows_Installation_Inno Setup_Pascalscript - Fatal编程技术网

Windows Inno设置:创建自定义表单

Windows Inno设置:创建自定义表单,windows,installation,inno-setup,pascalscript,Windows,Installation,Inno Setup,Pascalscript,我正在使用Inno设置。我是初学者,对它不太熟悉。 我的标准安装程序中有两个页面,一个接一个,我需要使用它们的元素(RepositoryPage和ServicePage(最后一页)) 存储页面: 过程CreateRepositoryPage; 变量 i:整数; SqlNamesArray:TArrayOfString; LblMonitorService、LblUsername、LblPassword:TNewStaticText; 开始 RepositoryPage:=CreateInput

我正在使用Inno设置。我是初学者,对它不太熟悉。 我的标准安装程序中有两个页面,一个接一个,我需要使用它们的元素(
RepositoryPage
ServicePage
(最后一页))

存储页面:

过程CreateRepositoryPage;
变量
i:整数;
SqlNamesArray:TArrayOfString;
LblMonitorService、LblUsername、LblPassword:TNewStaticText;
开始
RepositoryPage:=CreateInputQueryPage(wpSelectComponents,'Configuration','');
{Windows用户名.RepositoryPage.Edits[2]}
RepositoryPage.Add(“”,False);
{Windows password.RepositoryPage.Edits[3]}
RepositoryPage.Add(“”,True);
LblMonitorService:=TNewStaticText.Create(RepositoryPage);
使用LblMonitorService do
开始
父项:=RepositoryPage.Surface;
左:=0;
宽度:=RepositoryPage.SurfaceWidth;
高度:=ScaleY(17);
自动调整大小:=假;
标题:=“仪表板服务”;
结束;
LblUsername:=TNewStaticText.Create(RepositoryPage);
用LblUsername做什么
开始
父项:=RepositoryPage.Surface;
左:=0;
顶部:=LblMonitorService.Top+LblMonitorService.Height+ScaleY(17);
宽度:=RepositoryPage.SurfaceWidth;
高度:=ScaleY(17);
自动调整大小:=假;
标题:=“Windows帐户用户名(域\用户名):”;
结束;
RepositoryPage.Edits[0]。顶部:=LblUsername.Top+LblUsername.Height;
LblPassword:=TNewStaticText.Create(RepositoryPage);
用lblpassworddo
开始
父项:=RepositoryPage.Surface;
左:=0;
顶部:=RepositoryPage.Edits[0]。顶部+RepositoryPage.Edits[0]。高度+ScaleY(15);
宽度:=RepositoryPage.SurfaceWidth;
高度:=ScaleY(17);
自动调整大小:=假;
标题:=“Windows帐户密码:”;
结束;
RepositoryPage.Edits[1]。顶部:=LblPassword.Top+LblPassword.Height;
LogOnAsServiceCheckBox:=TNewCheckBox.Create(RepositoryPage);
使用LogOnAsServiceCheckBox do
开始
父项:=RepositoryPage.Surface;
Top:=RepositoryPage.Edits[1]。Top+RepositoryPage.Edits[1]。Height+ScaleY(16);
左:=0;
宽度:=RepositoryPage.SurfaceWidth;
高度:=ScaleY(17);
标题:=“添加”作为服务登录“权限”;
选中:=真;
结束;
RepositoryPage.Values[0]:=ExpandConstant('{computername}')+'\'+ExpandConstant('{username}');
RepositoryPage.值[1]:='';
{更改文本框的文本颜色}
RepositoryPage.Edits[1]。Font.Color:=$ffffff;
结束;
服务页面:

[代码]
程序创建服务页面;
变量
SSLNameArray:TArrayOfString;
i:整数;
开始
ServicePage:=CreateInputQueryPage(RepositoryPage.ID,'Web服务器配置','');
{Username.ServicePage.Edits[0]}
ServicePage.Add(“”,False);
{Password.ServicePage.Edits[1]}
ServicePage.Add(“”,True);
{确认密码.ServicePage.Edits[2]}
ServicePage.Add(“”,True);
{Http服务器配置}
{Http复选框}
HttpServerOptionCheckBox:=TNewCheckBox.Create(ServicePage);
使用HttpServerOptionCheckBox do
开始
父项:=ServicePage.Surface;
Top:=ScaleY(0);
左:=0;
宽度:=ScaleX(350);
标题:=“HTTP web服务器”;
选中:=真;
OnClick:=@OnHttpServerOptionCheckBox;
结束;
{Http端口的标签}
LblHttpPort:=TNewStaticText.Create(ServicePage);
使用LblHttpPort do
开始
父项:=ServicePage.Surface;
左:=ScaleX(15);
Top:=HttpServerOptionCheckBox.Top+HttpServerOptionCheckBox.Height+ScaleY(5);
宽度:=ServicePage.SurfaceWidth;
自动调整大小:=假;
TabOrder:=1;
标题:=“服务器端口:”;
结束;
{为Http端口编辑}
HttpPortTextBox:=TNewEdit.Create(ServicePage);
使用HttpPortTextBox do
开始
父项:=ServicePage.Surface;
顶部:=LblHttpPort.Top+LblHttpPort.Height+ScaleY(2);
左:=ScaleX(15);
宽度:=ScaleX(60);
文本:='5019';
字体.颜色:=$ffffff;
结束;
{测试Http端口的测试按钮}
TestHttpPortButton:=TNewButton.Create(ServicePage);
用TestHttpPortButton做
开始
父项:=ServicePage.Surface;
Top:=HttpPortTextBox.Top-ScaleY(2);
左:=HttpPortTextBox.Width+ScaleX(20);
宽度:=ScaleX(75);
高度:=ScaleY(23);
OnClick:=@TestHttpPortButtonOnClick;
标题:=‘测试’;
结束;
{Http端口防火墙异常复选框}
CreateAddFirewallexceptionHttpCheckBox:=TNewCheckBox.Create(ServicePage);
使用CreateAddFirewallexceptionHttpCheckBox执行以下操作
开始
父项:=ServicePage.Surface;
Top:=HttpPortTextBox.Top+HttpPortTextBox.Height+ScaleY(5);
左:=ScaleX(15);
宽度:=ScaleX(350);
高度:=ScaleY(17);
标题:='为指定端口创建防火墙例外';
选中:=真;
结束;
{ //////////////////////////////////////////////////////////////////////////////////// }
{Https服务器复选框}
HttpsServerOptionCheckBox:=TNewCheckBox.Create(ServicePage);
使用HttpsServerOptionCheckBox do
开始
父项:=ServicePage.Surface;
Top:=createAddFirewalleExceptionHttpCheckBox.Top+createAddFirewalleExceptionHttpCheckBox.Height+ScaleY(20);
左:=0;
宽度:=ScaleX(120);
高度:=ScaleY(17);
标题:=“HTTPS web服务器”;
选中:=假;
OnClick:=@OnHttpsServerOptionCheckBox;
结束;
{Https服务器端口标签}
lblhttpport:=TNewStaticText.Create(ServicePage);
使用LblHttpsPort do
开始
父项:=ServicePage.surface